Enable F1 as a keystroke to submit editor code line-by-line to the script console

AHLRAP-1070 Merging in work to date with PyDev 2.3.0 master

Initial F1 work.

Change-Id: I6530e3d3b074688235b7d9059d38358129f99f7d

AHLRAP-1070 Merging in John Nolan's changes to fix console buffering.

Change-Id: I5564e8689d5951bd2a2fe4a96c2ecb86d3b13232

AHLRAP-1371 AHLRAP-1366 Fixes to F1 Console submission

This is a squash of 5 commits.

This is a fix for AHLRAP-1373 'If you change the console too often, F1
stops working'. The problem was that the exec line in shell module would
raise an exception if an appropriate console was not available for
command submission. Once the module had the raised exception, I guess
eclipse doesn't reinitialise it again so one needs to restart PyDev to
get F1 functionality back.

I fixed this by merely using a try-except block to catch any exceptions.

AHLRAP-1371 AHLRAP-1366 Fixes to F1 Console submission

This patch carries a few changes:

- Fix for AHLRAP-1371: When the Scripting Console was visible, the code
submission would send the code to a view only window and this resulted
in an unhandled exception. This exception broke the script and it
wouldn't work again. The change I have made fixes this by handling the
exception; but also raising a console window so the code can be
submitted.

- Fix for AHLRAP-1366: When stepping through the code using F1, when the
user reaches the end of the file, we don't want to wrap around to the
beginning. It makes no sense to jump all the way back to the import
statements once the module is done running. This fix was done by
changing how the goto_next_line functions works. It now returns a
boolean for whether or not is actually moved to the next line.

- Changing some function names to use pythonic_naming_style rather than
javaNamingStyle.

- Some basic dead code removal.

- There is a lot of code that could be tidied up here, but I have
refrained from going carte blanche and renaming all functions which are
not called externally to have a _prefix; or removing comments and
replacing them with extensive docstrings. This module could use some
love.

Cosmetic changes.

- Renamed variables to reflect their privacy.

- Added some meagre documentation.

Removed re-raise which was incorrectly commited previously.

Protect from F1 submission when no Console is set.

James Blackburn found that when the Scripting Console is set
and a file is opened, and F1 is hit, an exception was thrown as
no Console was found. Unfortunately, the IConsoleView doesn't
appear to provide a way to find anything but the top of the
IConsole list; so I've just protected it now.

Also, to aid readability, I've inverted some if statements to
return and reduced the nesting level for _get_console_parts and
_show_console.

AHLRAP-1366 - Fixed the F1 loop around

This is a subsequent fix to the previous commit now using the
last_line calculated from the document.

AHLRAP-1366 - Do not iterate through file when no Console is available.

Change-Id: Ic190b8b51110fa764dbbcd7f32f4d9fc006e6f15

AHLRAP-1373 - Rejig the F1 console resolution using ConsoleManager

James Blackburn pointed me at the ConsoleManager for resolving the current console.
This simplified the code dramatically and made it more robust for corner cases.

AHLRAP-1375 Make F1 work with indented lines.

Change-Id: I67853956e57b32170ea1e7d0534bd762f5f01861

AHLRAP-1509 Handle block continuation ; else ; elif ; finally ; except

Change-Id: I2f0da9ae5943d962edbfe8614286bfb6e6ca5d4a

AHLRAP-2286 Incorrect behaviour when F1'ing a block of code

Use the IPytho Input Splitter to chop input, rather than hacky custom code.

Change-Id: Ic6ae39c91b8d96f3c56aa0e1821ecb2e7a75fd7c

Implement F1 block mode using F1 line-by-line mode, this way we'll have
consistent behaviour between the two modes.

Do nothing if the user does F1 on a comment
Fix special methods of class pydevd_constants.Null.
Null.__iter__() now returns an iterator for an empty tuple. The previous
implementation caused an infinite loop.
Pickling Null objects is now possible.
Fix special methods of class pydevd_constants.Null.
Don't pretend to implement special methods.
Changed Simple Jython Runner to suport multiple switches for console
vmargs
PyDev 3.3.3 released.
1. When quick config is used and the user finishes the wizard before it finishes, we'd have an empty interpreter (instead of Default). 2. A package explorer refresh could end up with errors which wouldn't be removed (because we could create more than one ProjectInfoForPackageExplorer for the same project -- in fact, we did create one for each tree but only one was updated with pythonpath changes.
Fixed unicode decode error when running unit-tests under python 2.x
Fixed issue where we'd open a file as if it was an external file when it was actually a file in the workspace or inside a source folder.
Using PySourceLocatorBase to find files/containers instead of relying on the IWorkspaceRoot which can be flawed.
Added extension to change command line / fixed issue finding file/container which matched exactly the container item.
When setting trace, set the trace function for current untraced threads.
Fixing django interactive shell to work with newer versions of Django.
.gitignore / adding .pydevproject.
PyDev/303: Allow reordering of PYTHONPATH with drag and drop.
Minor
Improvig sort of imports (spaces at end / not passing number of available columns specified).
Fixed issue on completions based on comments.
Minors.
Saving locals on pypy.
Improved py.test integration: we can now select which tests to run properly with Ctrl+F9 (even if not under a class).