Improved calculation of the column ruler location in the text editor view.

The font width is now calculated as the font maximum advancement width. With this measure, the scroll view point origin is no longer needed.
Fixed several issues with the documentation and callPythonParserMethod: methods of PLPythonIntrospectionController.

In the documentation method, refactored the method to use enumerateKeysAndObjectsUsingBlock on the dictionaries returned from calling the Python parse module. Fixed an issue where the NSValue objects in the dictionary were not converted to their pointerValue before calling them with the Python API functions.

Simplified the callPythonParserMethod: to use the PyObject_CallMethod() function rather than PyObject_CallMethodObjArgs().
Added a navigator popup button to the Python text editor view extension.

The popup button is added to the PLEditorViewController.xib file in the right side of the status bar. Added an instance variable bound to this interface element in the PLEditorViewController. The controller registers for the NSPopUpButtonWillPopUpNotifiacation and in the responding method it uses the python introspection controller to replace all items in the popup with function and class names.

Added a method to the PLPythonIntrospectionController, navigation, that returns a dictionary of function/class names mapped to information about their location in the file. This simply generalizes the information for any language returned from the documentation instance method.
Updated the documentation method in PLPythonIntrospectionController with improved error checking and to return values.

Instead of returning a string representation of the line number, return a NSNumber.
The PLPythonIntrospectionController navigation method now maps keys to line numbers.

Previously it mapped to the arrays returned from the documentation method.
Clicking an item in the navigation pop up now selects and scrolls to the item in the text editor.

The PLEditorViewController popUpButtonWillPopUp: method, each added menu item's tag is set to the line number returned from the python introspection controller. In the clickMenuItem: method, select the line range for the selected line number. Added a function positionForLineNumber() to calculate starting position of a line number in the textEditorView.
The navigation popup is now ordered by line number.

In PLEditorViewController, the popUpButtonWillPopUp: method sorts the keys in the navigation dictionary by the line number values. Keys are then added in order of the sorted array.
The selected item in the navigations popup button persists through clicks.

The selected title is saved before removing all items from the navigation popup in the popUpButtonWillPopUp in PLEditorViewController. It is then restored after adding the items.
Fixed an off-by-one error in PLEditorViewController's lineNumberForPosition() function.

Use NSLocationInRange to check if the position is within the line range.
Merge branch 'develop' into feature-navigator_popup
The navigation popup title now changes with the insertion point.

The Parser methods functions and classes in the parse module now return the line ranges of the function or class instead of just the start line number. Added a method _node_range() to the module to calculate the end line number. Modified the PLPythonIntrospectionController documentation method to extract these new ranges into an NSValue.

In PLEditorViewController, modified the navigation popup sorting to use the range location in the new updateNavigationPopUp method, which contains all the logic of the previous popUpButtonWillPopUp: method (this now simply calls the former method). In the textView:willChangeSelectionFromCharacterRange:toCharacterRange: delegate method, use the navigation dictionary to determine which navigation node the insertion point is located in. Then update the navigation popup button accordingly to select this node title.
Improved return values of Parser functions and classes methods.

The classes method now returns a 3-tuple with the addition of a formatted string of its subclasses. Both methods return a namedtuple, Definition, defined in the parse module.
The Parser now exposes a navigation method rather than functions and classes.

The navigation method calls both _functions() and _classes() to return a dict of all navigatable titles mapped to their line range. Updated PLPythonIntrospectionController by removing the documentation method and modifying the navigation method to convert the dict returned from the navigation method to a NSDictionary mapped to NSValues for each range.
Navigation popup now displays messages for no selection and no navigation.

When no navigation is available, inactivate the popup and add an item with the title "No navigation items to display" in the updateNavigationPopUp method of PLEditorViewController. When the selection is not within a navigation node, add a "No selection" item (now an instance variable of PLEditorViewController) and select it as the title. When the popup is displayed, remove this item. When the popup is closed, display it again if needed.
Improved positional layout of navigation popup.

The PLEditorViewController.xib now uses auto-layout. Added constraints for the navigation popup such that it is anchored in place and its width changes as the view is resized.
Navigation popup now uses indentation to display the hierarchy of items.

The parse module _function() and _clases() methods now walk the entire tree and return information on all functions and classes instead of only module-level definitions. To avoid naming clashing, they each return a list of Definition namedtuples, which now includes a name field. The navigation method returns a dict of ranges mapped to item names.

To handle the new dict mapping (ranges as keys), the dictionaryWithPythonDict: category is modified to map NSValue pointers to NSValue pointers, rather than converting keys to strings. Updated the PLSyntaxHighlighter accordingly to convert its keys to strings. Updated PLPythonIntrospectionController navigation method to convert the Python dict to map NSValue ranges to strings.

PLEditorViewController now has a navigationDictionary instance variable. This is used to compare between calls to updateNavigationPopUp to avoid unnecessarily updating the popup (previously compared strings, but this avoids false-positives due to changes in hierarchy). The updateNavigationPopUp uses the range keys of the navigation dictionary to determine the appropriate hierarchy and sets the indentation of the menu items.
The navigation popup No Selection/No Navigation messages are no longer added and removed; instead, they are hidden or unhidden.

These two items are now added upon PLEditorViewController initialization and then hidden or unhidden depending on the source code and selection. Added two constants to keep track of their index in the menu. Removed the noSelectionMenuItem instance variable, using the index to track it instead.
Several minor fixes in parse module _functions() method.

Fixed bug with incorrect ordering of default arguments. Added support for varargs and kwargs. Fixed an issue where empty string default arguments would not appear.
Reduced amount of parsing source code for navigation popup button.

In PLEditorViewController, seletion changes no longer cause parsing. Instead, the parseText method also updates the navigation dictionary.
Cleaned up methods in PLEditorViewController for navigation popup.

Replaced enumerateObjectsWithOptions:usingBlock: on selection changes with a fast enumeration. The sortedNavigationRanges: method no longer takes an argument; instead, it uses the navigationDictionary instance variable.

Removed menuDidClose: delegate method. The No Selection item is not unselected anymore when opening the popup button so this method is unnecessary. No longer set the menu delegate.