GNAT Studio User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
GNAT Studio User’s Guide Release 22.0w AdaCore Aug 25, 2021 CONTENTS 1 Description of the Main Window3 1.1 The Workspace..............................................4 1.1.1 Common features of the views.................................4 1.1.2 Common features of browsers.................................4 1.2 The Preferences Assistant........................................7 1.3 The Welcome Dialog...........................................8 1.4 The Tool Bar...............................................9 1.5 The omni-search............................................. 10 1.6 The Messages view............................................ 12 1.7 The Locations View........................................... 13 1.8 The Project view............................................. 14 1.9 The Learn view.............................................. 17 1.10 The Scenario view............................................ 18 1.11 The Files View.............................................. 19 1.12 The Windows view............................................ 20 1.13 The Outline view............................................. 21 1.14 The Clipboard view........................................... 24 1.15 The Call trees view............................................ 25 1.16 The Bookmarks view........................................... 26 1.16.1 Basic usage: Creating a new bookmark............................ 26 1.16.2 Adding more bookmarks.................................... 26 1.16.3 Organizing bookmarks into groups............................... 27 1.16.4 Adding notes.......................................... 29 1.16.5 Add note with drag and drop.................................. 29 1.16.6 Filtering bookmarks....................................... 30 1.16.7 Favorite files.......................................... 31 1.17 The Python Console........................................... 32 1.18 The OS Shell Console.......................................... 32 1.19 The Execution window.......................................... 33 1.20 The Tasks view.............................................. 33 1.21 The Project Browser........................................... 35 1.22 The Dependency Browser........................................ 36 1.23 The Elaboration Circularities browser.................................. 38 1.24 The File Selector............................................. 39 2 The Menu Bar 41 2.1 The File Menu.............................................. 41 2.2 The Edit Menu.............................................. 43 2.3 The Navigate Menu........................................... 44 2.4 The Find Menu.............................................. 46 i 2.5 The View Menu............................................. 47 2.6 The Code Menu............................................. 49 2.7 The VCS Menu.............................................. 50 2.8 The Build Menu............................................. 51 2.9 The Analyze Menu............................................ 52 2.10 The Debug Menu............................................. 53 2.11 The SPARK Menu............................................ 55 2.12 The CodePeer Menu........................................... 55 2.13 The Window Menu............................................ 55 2.14 The Help Menu.............................................. 56 3 Multiple Document Interface 57 3.1 Window layout.............................................. 57 3.2 Selecting Windows............................................ 57 3.3 Closing Windows............................................. 58 3.4 Splitting Windows............................................ 58 3.5 Floating Windows............................................ 58 3.6 Moving Windows............................................ 59 3.7 Perspectives............................................... 60 4 Editing Files 61 4.1 General Information........................................... 61 4.2 Editing Sources.............................................. 65 4.2.1 Key bindings.......................................... 65 4.3 Recording and replaying macros..................................... 66 4.4 Contextual Menus for Editing Files................................... 67 4.5 Handling of casing............................................ 68 4.6 Refactoring................................................ 68 4.6.1 Rename Entity......................................... 69 4.6.2 Name Parameters........................................ 69 4.6.3 Extract Subprogram....................................... 69 4.7 Using an External Editor......................................... 73 4.8 Using the Clipboard........................................... 74 4.9 Saving Files............................................... 75 4.10 Printing Files............................................... 75 5 Source Navigation 77 5.1 Support for Cross-References...................................... 77 5.2 Navigating with hyperlinks....................................... 77 5.3 Highlighting dispatching calls...................................... 77 5.4 Contextual Menus for Source Navigation................................ 78 5.5 The gnatinspect cross-reference database (deprecated)......................... 78 5.5.1 The cross-reference database.................................. 79 5.5.2 Cross-references and partially compiled projects........................ 80 5.5.3 Cross-reference and GNAT runtime.............................. 80 6 Project Handling 81 6.1 Description of the Projects........................................ 81 6.1.1 Project files and GNAT tools.................................. 81 6.1.2 Contents of project files..................................... 82 6.2 Supported Languages.......................................... 83 6.3 Scenarios and Configuration Variables.................................. 84 6.3.1 Creating new scenario variables................................ 84 6.3.2 Editing existing scenario variables............................... 86 6.4 Extending Projects............................................ 87 ii 6.4.1 Description of project extensions................................ 87 6.4.2 Creating project extensions................................... 87 6.4.3 Adding files to project extensions............................... 87 6.5 Aggregate projects............................................ 87 6.6 Disabling Editing of the Project File................................... 88 6.7 The Project Wizard............................................ 89 6.8 The Project Properties Editor...................................... 89 6.9 The Switches Editor........................................... 91 7 Searching and Replacing 93 7.1 Searching................................................. 93 7.2 Replacing................................................. 95 7.3 Searching in current file......................................... 96 8 Compilation/Build 97 8.1 The Target Configuration Editor..................................... 97 8.1.1 The Targets tree......................................... 98 8.1.2 The configuration panel..................................... 99 8.1.3 Background compilations.................................... 100 8.2 The Build Mode............................................. 100 8.3 Working with two compilers....................................... 101 8.3.1 Interaction with the remote mode................................ 101 9 Debugging 103 9.1 The Call Stack View........................................... 104 9.2 The Variables View............................................ 105 9.3 The Breakpoint Editor.......................................... 106 9.4 The Memory View............................................ 109 9.5 The Registers View............................................ 110 9.6 Using the Source Editor when Debugging................................ 110 9.7 The Assembly Window......................................... 111 9.8 The Debugger Console.......................................... 112 9.9 Customizing the Debugger........................................ 113 9.10 Command line interface......................................... 114 10 Version Control System 117 10.1 Setting up projects for version control.................................. 117 10.2 Specifying the VCS repository...................................... 119 10.3 Finding file status (Project view)..................................... 119 10.4 The VCS Perspective........................................... 121 10.5 The Commits view............................................ 122 10.5.1 Viewing modified files..................................... 123 10.5.2 Committing files........................................ 123 10.5.3 Actions in the Commits view.................................. 124 10.5.4 The Commits view local toolbar................................ 124 10.6 The History view............................................. 126 10.6.1 List of all past commits..................................... 127 10.6.2 Graph of past history...................................... 127 10.6.3 Details on selected commits.................................. 130 10.7 The Branches view............................................ 132 10.7.1 Git and the Branches view................................... 134 10.7.2 CVS and the Branches view.................................. 136 10.7.3 Subversion and the Branches view............................... 136 10.8 The Diff View.............................................. 137 iii 11 Tools 139 11.1 Coding Standard............................................