Changes to the user interface
This release of GPS is based on a major new release of the gtk+
toolkit. We took the opportunity to make various enhancements to
the user interface itself.
Color schemes
A new preference is available to select color schemes. This effects other
preferences and can be used to set dark colors for the background of
editors and windows.
Search window improvements
The search dialog provides a Scope to search only in the source
files of the current project. The dialog was improved to show exactly which
project is considered as current. Also, from
an editor will set the current project to be that of the editor.
GPS can now limit Find and replace operations to the currently selected text.
This is done by selecting the scope Current Selection in the
Search dialog; this scope is automatically selected when launching
the dialog while a selection exists in the current editor.
Key shortcuts dialog improvements
The display of the key shortcuts in this dialog now matches what is
done for the toplevel menus, using symbols like up arrow for the shift
key, a caret sign for the control key, and the special symbols for
Mac keyboards.
Multiple Document Interface
Status bar removed
The status bar has been removed. It was only used to display the current tasks
in progress, and the corresponding progress bars were moved to the right of the
toolbar, replacing the throbber.
Use ellipsis in window titles
The text in the title bars and in the notebook tabs will now use ellipsis
(”...”) when the window is too small to accomodate the whole text. The size
of notebook tabs is also limited so that we do not end up with a single tab
using most of the notebook widths, thus hidding the others. This behavior
is controlled by a new preference .
Limitations in the organization of windows
GPS now adds a restriction as to where editors and views can be put. For
instance, editors can only be part of the perspective-independent part of the
desktop, so that they always remain visible when switching perspectives. These
limitations should prevent some surprising behaviors that could happen before
due to the flexibility of the MDI.
Close tabs with middle-click
This is close to the behavior most web browsers implement and is a convenient
way to quickly close a number of tabs.
Vertical tabs
It is now possible, via the contextual menu on each notebook tab, to change the
orientation of the text. For instance, displaying the tabs on the left will by
default rotate the text bottom-to-top, thus saving horizontal space.
Preserve location in new views
When creating a new view for an editor (for instance through drag-and-drop) the
new view is now displayed at the same location as the original editor, rather
than on the first line.
Main window title bar shows base name first
Speaking of title bars, the GPS window’s title has been changed slightly, so
that the base name of the current file appears first, then its directory, and
finally the project. This is more user friendly on Windows where the title of
the window is displayed in the task bar. It is now easier to chose between
multiple running GPS.
Clickable qualified name in editor status bars
The name of the current subprogram, as displayed in the editors status bars,
now includes the name of the enclosing subprograms and packages. Each of
these names is clickable to easily jump to the beginning of the enclosing
block.
Outline view improvements
Protected objects in outline view
Protected and task types/objects and their entries are now visible in
Outline view. A new filter in Show tasks, entries, and
protected types is used to show/hide these items (in the local configuration
menu).
Group spec and body in outline view
It is now possible to group the spec and body (or spec and full view) for an
entity on the same row in the Outline view, to reduce the total height of the
Outline view. Clicking on the name of the entity will jump to its spec,
but if this is already the current location in the editor will jump to its body
instead. It is also possible to click on either of the two icons to jump
directory to the spec or the body.
Filter in outline view
A filter has been added to the Outline view to make it easier to find entities.
Flat view mode in outline
It is now possible to display all entities at the same level, rather than
nested hierarchically. In some cases, it makes searching for an entity easier.
It also reduces the amount of horizontal space that the Outline
view needs.
Scenario view displays a tree
The Scenario view has been updated to a more usable tree rendering.
Messages window
It is now possible to configure whether the Messages window should wrap lines,
or require horizontal scrolling.
When a build terminates on failure, GPS now displays the total progress (as
displayed by the task manager) in the console. This makes it easier to know how
many files were compiled up to the first compilation error.
There are various backdoors in GPS that makes it possible to close the
Messages window. GPS will now automatically reopen it as needed.
Locations view
In the Locations view, actions such as clear locations, or the
filter panel were moved into a local toolbar to make them more accessible. The
preference Auto Jump To First Location was removed from the
preferences menu and moved to the toolbar as well.
The filter was also moved into that local toolbar, and will now also match
the location of messages, not just their text.
A new setting was added to force the alphabetical sorting of file names.
By default, the contents of the Locations view is no longer saved
when GPS exits (and restored when it restarts), because it sometimes resulted
in very long loading times. The saving can be reactivated by using the local
configuration menu.
Support for high-density displays
GPS now supports high-density displays. In particular, the display of tooltips,
editor line numbers, or the various browsers (call graph, entity, debugger,...)
now looks much sharper.
On the other end of the spectrum, GPS now supports displays with a color depth
of 16 bits per pixels, which are often used for remote displays.
Enhancements to editors
Aliases expansion directly in editors
The aliases expansion feature now works directly in-editor, without presenting
the user a dialog for aliases with parameters. The user progresses through the
fields directly in the editor via the Ctrl+Tab shortcut. Visual feedback
is provided for the current field via highlighting.
Status bars
When a selection exists in an editor, the status bar will display the number of
characters and lines that are selected.
The order of buttons and text in the status bar was modified to avoid
flickering when the location is changed or a selection is made.
Syntax highlighting
Ada 2012 and SPARK 2014 aspects are highlighted with a different color
configurable via the preferences, so that these are easily found when editing
source files.
GPS now supports highlighting of numeric values in the code editor and provides
a new user preference to customize it.
Smart-completion
Smart-completion on aliases
Aliases can now be completed and expanded by the regular smart-completion
mechanism.
Visual indication of visibility
In the smart completion popup, entities that are not visible in the current
scope are now displayed in grey.
Completion for return blocks
Add “return ... end return;” statement support for complete block completion
Indentation
Improved indentation of conditional expressions
Ada 2012 If-expressions and case-expressions are better handled by the
indentation engine and in particular extra indentation levels are used for
each case branch.
Improved indentation of parenthesized expressions
Extra spaces following an open parenthesis is now taken into account when
indenting Ada code.
Refill automatically computes paragraphs
The menu will now either apply to
the current selection if it exists (as before), or automatically compute the
extents of the current paragraph to reformat (instead of only applying to the
current line).
When refilling a comment block with the Refill command, the cursor
will now be placed at the end of the last word of the comment, so as to enable
the user to keep editing his comment seamlessly.
Preserve location in new views
When creating a new view for an editor (for instance through drag-and-drop) the
new view is now displayed at the same location as the original editor, rather
than on the first line.
Transluscent highlighting colors
It is now possible to specify translucent colors for error messages,
current lines,... in the editors. This is a convenient solution so that
the current line also shows whether it has an associated error.
Safer saving of files
Saving files is now done via a temporary file which is later renamed.
This is safer, and protects against temporary disk issues that would happen
just during the actual saving, and could result in losing work.
Plug-ins and python enhancements
Plug-ins dialog
The plug-ins dialog has been simplified. It no longer shows the python files
that are mandatory for GPS. It no longer supports custom initialization
commands for the modules (since standard python can be used for this). The
implementation of the plug-ins is now accessible via an hyper link, instead of
being displayed in this dialog.
Spark
The SPARK 2014 toolset is now supported from both GPS and GNATbench. A
menu will be available if the SPARK 2014 toolset is
installed and found on the PATH at start up.
CodePeer
Progress bar when running gps_codepeer_bridge
After running codepeer, gps_codepeer_bridge is launched to load
messages, which can take a long time on large sources. A progress bar is now
displayed during this phase to give feedback to the user.
Separate file for audit data
CodePeer’s audit data for messages are stored in separate file, to improve
performance of loading it on subsequence GPS run.
Simplified CodePeer report window
The CodePeer report window has been simplified to improve usability and remove
unneeded information. Access to the various filters is also improved.
New review classification of CodePeer messages
When doing a manual review of a CodePeer message, the user can
no longer change the message ranking, but instead specify a review
classification and the name of the reviewer. New message review dialog is
added and new filter was added for CodePeer Report view to manage visibility
of messages by review status.
Generate CSV report
As part of the CodePeer integration, a new menu
is provided to generate a CSV
report file directly from GPS.
New modules.py
A new support python script named modules.py has been added to GPS. It
provides a high-level interface to extending GPS. In particular, it makes it
possible to create new views that are saved in the desktop and restored when
GPS is restarted.
Speed up in highlighter.py
This python module is used as the basis for all python scripts that need to
highlight (part of) editors. In particular, you can easily extend it to
highlight specific text or regular expressions in your buffer. This script
now provides an OverlayStyle class, which supports more properties than
before (in particular, you can strike through or underline specific text
in your editors with just a few lines of code).
This improves two user-visible plugins, dispatching.py and
auto_highlight_occurrences.py.
Removed: execute_extended.py
This plugin allows one to easily execute any of the GPS commands via the
keyboard. This behavior is now directly available via the new global search box
in the GPS toolbar.
GPS.EditorOverlay can highlight a whole line
The EditorOverlay class can now be used in Python plugins to highlight an
entire line, through the property “paragraph-background”:
# Create an overlay for an editor:
b = GPS.EditorBuffer.get(GPS.File ("my_file.adb"))
o = b.create_overlay("my_overlay_name")
# Set the paragraph-background property to pink
o.set_property ("paragraph-background", "#f0c0c0")
# This highlights the entire line 317 in my file
b.apply_overlay (o,
GPS.EditorLocation(b, 317, 1),
GPS.EditorLocation(b, 317, 1))
GPS.MDI.add to put on top of consoles
The python function GPS.MDI.add now has additional parameters to specify
the initial location of the new widget. This allows you to put widgets on
top of the existing GPS consoles for instance.
Other enhancements worth noting
Project wizard uses gnatname
The project wizard now optionally uses gnatname to search for Ada units in
files with non-standard naming conventions.
Codefix improvements
Autofix has always done fixes in lowercases. This enhancement performs the
fixes on missing constants following the user defined preferences specified in
the preference word casing.
Preferences
The Apply button was removed from the preferences dialog. Instead, GPS will be
refreshed every time any of the settings is modified.
GPS will now only save those preferences that have been modified into its
HOME/.gps/preferences.xml file. This change should be mostly invisible
to users, except when changing versions of GPS where the new default will be
picked up automatically.
A new preference has been added to control the color of the current line
in the debugger. This is in particular useful when combined with dark
themes.
A new preference was added to
control the order in which GPS looks at the comments (before or after the
declaration) to retrieve the documentation for an entity. This impacts the
tooltips displayed while in the editor, as well as the generation of
documentation via the menu.
Another preference was added to set the toolbar style to “text only”.
A new preference was added in the Windows page to override the
background of tooltips as set by the gtk+ theme.
Debugger
The contents of the dialog to connect to a board (target name and protocol)
is now restored every time the dialog is displayed, avoiding the need to
enter the same information every time.
Command line
This new switch is similar to -X in gprbuid, and can be used to set the value
of the scenario variables found in your project.