GNAT Studio Release Notes

GNAT Studio 21.x Release Notes

Release Date: October 2020

This GNAT Studio development cycle was focused on stability and performance enhancements, and to improving source navigation, transitioning more and more features to the new engine in the Ada Language Server.

C & C++ Support

GNAT Studio has replaced its older libclang-based custom engine with it by a C and C++ language server developped as part of the LLVM project, called clangd.

As a a result of this transition, dynamic completion is now supported for C and C++ and some new features have been introduced. One of the great features that clangd brings to GNAT Studio is the signature help, which pops up when opening a parenthesis for a function call: GNAT Studio will show the function’s signature, showing the parameter expected at each point.

_images/signature_help.png

Debugger & Emulator Integration

A new Pending breakpoints debugger preference has been added to allow pending breakpoints when using the debugger. When enabled, breakpoints that are not recognized when starting the debugger (i.e: breakpoints set on dynamic libraries) won’t be rejected: the debugger will try to set them once the executable runs. This preference is enabled by default.

A new button in the Assembly view local toolbar allows setting and deleting breakpoints at given instruction addresses.

The Start/Continue button in the debugger toolbar now offers the option to stop at the beginning of the main, just like the Debug ‣Run… menu.

The integration between GNAT Studio and GNATemulator has been improved: the same GNATemulator console is now reused across debugging sessions, instead of spawning a new one each time a new debug session starts. A clean button has also been added to the console.

Projects Support

An advanced preference has been added for the Scenario view to control the way scenario variables are expanded in command lines. By default, all the scenario variables are explicitly expanded. When the preference is deactivated, only variables with a value different from their default will be expanded.

Version Control

GNAT Studio now displays a warning message on any of the VCS views (e.g: Commits view) if it’s not able to find a version control system repository for the loaded project. An hyperlink is also displayed to configure the VCS repository manually.

_images/no_vcs_warning.png

The vcs commit action has been improved: if there is no staged file, then all the modified files are automatically staged before committing.

Source Editor

Code folding has been transitioned to the Ada Language Server, which allowed us to introduce a new set of preferences to perform automatic code folding:

  • Fold_With_Use_Blocks: automatically folds ‘’with’’ and ‘’use’’ blocks when a block has more lines than the setting (0 to disable).

  • Fold_Comment_Blocks: automatically folds comment blocks when a block has more lines than the setting (0 to disable).

  • Fold_Comment_Reg[1,2,3]: automatically folds comment blocks when a block’s contents matches the regular expression.’

A new toggle comment action to comment/uncomment the current line or selection has been added. You can associate a key shortcut to it via the Preferences dialog.

Miscellaneous UI/UX improvements

For the Locations view, new previous/next tag (same weight) actions have been added to allow in the Locations view to move between messages of same importance. (i.e: if an error is selected the action will find the previous/next error).

GNAT Studio 20.x Release Notes

Release Date: October 2019

The first GNAT Studio development cycle was mainly focused on improving source navigation and stability.

Debugger

The UI freeze that could occur when lauching a debug session on big executables no longer exists: the UI is now perfectly responsive during GDB’s “load” command.

Breakpoints are now correctly saved across debug sessions, even when some of them were not recognized with the loaded executable.

Projects Support

The Scenario view Apply and Discard buttons have been moved to the sidebar.

_images/scenario_view_20.png

It’s also possible to activate/deactivate the display of untyped scenario variables. This is done via the local configuration menu (hamburger menu) of the view.

The user experience when opening an erroneous project has been improved too: an editor issues opened for the project file that contains errors, allowing the user to modify it directly and reload it via the Project view after correcting it.

Version Control

Many improvements have been made regarding the new Version Control System engine, in particular regarding the ClearCase support. As a result, the old Version Control System (VCS1) has been completely removed from GNAT Studio. As a result, the GPS.INTERNAL.MODULE_VCS trace (corresponding to the old engine) has been removed and the GPS.INTERNAL.MODULE_VCS2 trace (corresponding to the new engine) has been renamed to GPS.MODULE.VCS. You can disable the GPS.MODULE.VCS trace if you want to disable completely the VCS support from GNAT Studio.

The diff viewer has also been improved, and clicking in a specific commit from the History view will open a separate editor to view the associated diff.

Tooltips that indicate the Commit-Id, Author, Date and Subject data have also been added and the overall performance of the view has been increased by loading asynchrounously the commits.

Omnisearch

Annoying bugs have been resolved regarding the omni-search. In particular, the omni-search results window now disappears as soon as the focus leaves the GNAT Studio main window.

Moreover, the progress bar counting has been fixed when the include all files from source dirs option is disabled.

The performance has also been improved when searching through file names on networked filesystems or on slow local disks.

Source Editor

Source editor tooltips have been revamped completely and are now also based on the Microsoft Language Server Protocol.

Hovering on a given Ada entity now displays the corresponding declaration code, without any formatting. The declaration code is highlighted and the associated comments are displayed right under. Tooltips have also been made scrollable to avoid having giant tooltips when the associated comments are very long.

_images/editor_tooltips.png

Contextual menus have been completely revamped for GNAT Studio: proper groups have been introduced as well as separators to clearly separate them.

_images/contextual_menus.png

Several new actions have been introduced to help developers.

A new strip trailing blanks action has been introduced to strip trailing spaces in the current editor.

GNAT Studio now also offers the possibility to fold/unfold all the blocks that are similar to the current one (e.g: fold all the “if” blocks when the cursor is on one of them) via the fold/unfold similar blocks actions.

A new plugin has been added to display the to compute and display the representation clauses in the editor. The plug-in is using the json output of gnatR, therefore a compiler version 20+ is needed.

Miscellaneous UI/UX improvements

It is now possible to open a file by double-clicking on the corresponding row in the Locations view.

GNAT Studio now displays a confirmation dialog before executing the generate body and generate body as separate actions.

The Refill action now works in project files, in the same way as Ada source files.

New Open folder and Open containing folder contextual menus have been added for the Project and Files views.

GPS Customization

Python API

the GPS.Entity class is now obsolete by default. This is due to the fact that GNAT Studio does not use anymore the gnatinspect database to provide cross-references.

More information on how to transition your custom plugins that use this GPS.Entity class to GNAT Studio can be found in the GNAT Studio User’s Guide, in the 20. How to transition from GPS to GNAT Studio section.

GPS 19.x Release Notes

Release Date: October 2019

The main goal for the development cycle of GPS 19 was to improve stability, and provide a better experience to newcomers. It includes a number of new features as well.

Learn View

A Learn view is now available in GPS. The purpose of this view is to help users familiarize with GPS. The actual contents of the Learn view is filtered depending on the current context: only the actions that are available in the current context are displayed.

_images/learn_view.png

Debugger

A new Registers view has been introduced, allowing users to watch and modify the value of registers on the target in real-time. The view’s local menu allows selecting the display format for register values, for instance switching between decimal and hexadecimal representations.

_images/registers_view.png

The Variables view now allows direct modification of the variables being displayed, either by double-clicking on the value column or by clicking on the Edit button of the local toolbar. Moreover, users can now drag a variable from a source editor to the Variables view in order to display it.

The performance of the Call Stack view has been increased: the frames are now retrieved lazily and the number of frames retrieved attribute one one time can be controlled via the Debugger/Call Stack/Frames limit preference.

A new Continue to line button is now displayed in the editors’ left side area when debugging, allowing users to continue the execution until a given line very quickly.

_images/continue_to_line.png

The toolbar buttons for debugging have been revamped: their icons have been modernized and two new buttons have been added for stopping and interrupting a running debugger.

The Debugger Execution view can now be cleared, closed and reopened during a debugging session.

Projects Support

The Scenario view GUI has been revamped: when an user types an invalid value for a scenario variable, the corresponding entry is now displayed in red. A modified icon is also displayed for scenario variables that need to be refreshed. In addition, two new Apply and Discard buttons have been added to the bottom of the view instead of the previous tiny local toolbar buttons.

_images/scenario_view_19.png

GPS now allows viewing and modifying variables declared in aggregated projects and untyped variables directly from the Scenario view.

Omnisearch

When searching something via the omnisearch, a progress bar is now displayed while loading the search results and, if the search fails, No results is displayed at the end. Furthermore, the contents of the omnisearch popup that displays the search results is now preserved when the focus goes out of GPS.

Source Editor

The minimal size of the editors’ side area can now be controlled via the Editor/Gutter right margin preference.

GPS now automatically makes read-only sections of code that are surrounded by the markers “– begin read only” and “– end read only”.

A new auto_locate_file.py plugin has been added: this plugin synchronizes the Project view with the currently selected editor: when switching from one editor to another, the file associated with the newly selected editor is highlighted in the Project view.

SPARK Integration

Messages reported by GNATprove can now be visualized and filtered according to their importance and the selected rule (e.g. overflow check).

A preference has been introduced to display this report automatically after running GNATprove and a new SPARK ‣ Show Report menu has been added to display it at any time.

_images/gnatprove_report.png

Key Shortcuts

Users are now able to define several key shortcuts for an action from the Key Shortcuts editor: ‘Modify’ button has been changed to Add button. In addition, they can assign the same key shortcut to several actions. The Remove button has also been improved, allowing users to only remove specific key shortcuts instead of all those that are assigned to an action.

Miscellaneous UI improvements

Support for multiple selection has been added to various views, including the Project Properties, Call Trees, Locations and Bookmarks views.

The color of the highest importance message is now displayed on the side of file/category nodes in the Locations view, making it easier to identify lines with messages of high importance.

A new preference has been added to hide/show the VCS status in the Windows view.

GPS Customization

Python API

New hooks have been added to the Python API (debugger_breakpoint_added, debugger_breakpoint_changed and debugger_breakpoint_deleted), allowing scripts to react to changes in debugger breakpoints.

the GPS.FileTemplate Python API has been improved: it now allows specifying an optional implementation file template when registering custom templates.

A new GPS.Message.cancel_subprogram method has been added in the GPS.Message python class to cancel a subprogram associated with a given message (i.e. the subprogram that is called when clicking on the message icon).

GPS 18.X Release Notes

Release Date: October 2017

The main goal for the development cycle of GPS 18 was to improve stability, and a better experience for newcomers. It includes a number of new features as well.

Preferences Assistant & Welcome Dialog

When starting GPS for the first time, a preferences assistant wizard allows you to quickly customize GPS to your preferred way of working. You’ll be able to change the following settings through this dialog:

  • color themes

  • key shortcuts theme

  • general settings

  • plugins

_images/preferences-assistant-1.png _images/preferences-assistant-2.png _images/preferences-assistant-3.png _images/preferences-assistant-4.png

The GPS welcome dialog has been reworked: a list of recently opened projects is now displayed on the left side.

_images/welcome-dialog.png

Version Control Support

The support of the version control system has been rewritten from scratch. Multiple version control systems and repositories are supported within the loaded project tree. The VCS Explorer and VCS Activities views have been replaced with new views. The Project and Files views now show the VCS status for files.

_images/vcs-projects.png

The History view shows the set of commits that were done in the repository in the past, along with a graphical diagram showing how branches were created or joined. This makes it easier to understand how the commits relate to one another.

_images/vcs-history.png

The Branches view lets you view and switch between existing branches, to create new branches, and to delete branches. If you are using git, you can also use this view to apply view stashed commits.

_images/vcs-branches.png

Support has been added to execute special VCS operations when a file needs to be made writable (which is useful for ClearCase, for instance).

All VCS operations are now performed much more efficiently, and getting the status for objects is almost instantaneous on most working directories.

Debugger

The Assembler view highlights assembler instructions, registers and addresses. It has a local toolbar for quick access to disassembly operations.

The Variables view allows to control format (display base) of variables via the contextual menu.

The Debug ‣ Print contextual menus have been reintroduced in GPS.

The Debug section of the contextual menu provides entries to control breakpoints (set, remove, disable, enable).

The GDB/MI protocol is supported and can be activated via the Debugger section of the Preferences dialog.

Test View

A new dedicated Test view’ was added to present tests, test cases and corresponding sources available in the project.

Outline

The expanded/collapsed state of the “withs” node is now preserved when switching between sources.

The Outline View is now able to present entities grouped by categories. This is enabled via a new preference Group by category, and works only in flat view mode.

Codefixes

Code fixing capabilities was enchanced to handle more messages from the compiler:

  • loop expression is replaced by Range attribute when compiler detects that Range attribute should be used to loop over the content of an array

  • removing of redundant “with” clauses now removes any accompanying “use” clauses

  • incorrect prefix of Result attribute replaced by the expected one

Workflows

A Build & Run and a Build & Debug toobar button have been introduced. Clicking on these buttons has for effect to build the selected executable, and perform the second action (either Run or Debug) if the build was successful.

Projects Support

The Interfaces attribute is now editable from the Library ‣ Standalone page of the Project Properties editor.

GPS no longer offers to edit project properties of a read-only project file.

A new attribute Read_Only can be placed in the IDE package of a project to prevent GPS from displaying the graphical editor on this project.

When applying changes made in Project Properties to all the possible values of a given scenario variable, no useless switch case is written in the resulting .gpr file.

We no longer display the list of entities defined in a file, in the Project view. This information is already available in the Outline, whenever a file is selected in the Project view. Removing it allowed us to speed up the display of the tree view.

Search & Replace

The GPS Search view has been completely revamped. The usability has been improved and an interactive mode has been added.

_images/search-dialog.png

Every Search/Replace action is now available from the keyboard.

The number of entries in the Search view combobox is now limited to 5 when the view is spawned. A separator has also been added between the predefined regexps and the previously searched patterns.

GPS now reports in the Messages window the number of occurrences that have been replaced when Replace All button of the Search view is clicked.

Source Editor

A new status indicator has been placed in the bottom-right corner of source editors, showing whether the editor has been modified.

A new action insert extended character has been added, allowing one to enter an extended character in the editor by its unicode number.

GNATdoc

GNATdoc is now able to process bodies, and extract documentation from bodies and generate separate pages for these bodies in the resulting HTML output. This is activated via the command-line switch ‘-d’.

GNATdoc now supports processing Ada 83 and Ada 95 codebases, in addition to Ada 2005 and 2012.

Detailed information is generated for task and protected objects, including their subprograms and entries.

Miscellaneous UI improvements

Key shortcuts are now displayed in GPS contextual menus.

The menu separators have been made more visible in dark themes.

Icons were added in the Window menu for editors. This allows displaying which editors are currently modified.

The labels containing the base name and directory of a file in the Properties dialog are now selectable, which means you can copy/paste from them.

GNAT runtime menu items for cross platforms have been moved into a separate submenu of Help ‣ GNAT runtime instead of placing them after Help/About submenu.

GPS now includes a new button to the right of the main toolbar, to let users easily switch perspectives.

The Go declaration … item is no longer shown when the subprogram does not have a declaration. Instead, the contextual menu only shows Goto body ….

The local configuration menu of the Locations view now contains an item Preserve message to control whether to keep build messages for files that are not being recompiled.

The Files view now reuses the same preference as the Project view to hide some files (those starting with “.” by default, although this can be configured in the preferences dialog).

Creating Projects and Files views is now much faster, in particular on large projects where a directory contains several thousands of files.

A File ‣ Project ‣ Add Complex File Naming Conventions menu has been added to run GNATname on project loaded by GPS.

The Memory Usage View has been improved. It is now able to display the static memory usage for memory regions, sections and object files, even when the link has failed.

If the Metrics view is already present, GPS will reuse it when computing metrics of a file/project.

Deployment of examples: GPS now asks to specify a directory for deploying GNAT examples via the HELP/GNAT/Examples menus, rather than opening examples in the location where they are installed.

New contextual menus have been added to create new files from templates (e.g: ‘New Ada Package’ contextual menu in the Project View). These templates are derived from the aliases mechanism and a Python API has been introduced to allow users to create their own templates.

GPS Customization

Python API

A new method GPS.Message.create_nested_message has been added to create nested messages.

It is now possible to create Tasks from the Python API, and to create tasks that monitor a workflow. This can conveniently replace some uses of the GPS.Timeout API, and integrates within the GPS Task Manager, allowing to provide progress indication for background tasks.

Python API of Libadalang is available for plugins, and can be used in GPS plugins to implement custom code checkers.

The GPS.Debugger provides new methods to manipulate frames - current_frame, frame_down, frame_up, frames, select_frame.

The scripting API has been enhanced with an add_debounce method which can be used to schedule callbacks to be called as soon as GPS is idle.

Platform Specific Improvements

Mac OS

A Mac OS Key shortcuts theme has been introduced in GPS, using the Command key instead of the control key in many places, and defines common Mac OS (e.g: ‘control + a’ to go to the beginning of the current line).

Windows

The colors used for selected items have been improved to make them more readable by default.

Linux

Electing an item now deselects any other unless the user is pressing a modifier key.