<--Last Chapter | Table of Contents | Next Chapter--> |
There are two IDE's, or Integrated Development Environments, available for gnat and Linux. PegaSoft's TIA (Tiny IDE for Ada) is a text-based IDE, while GRASP is an X-Windows IDE. Both have similar basic features.
On the other hand, if you are looking just for text editors with Ada syntax hilighting, many exist for Linux including elvis, emacs/xemacs and nedit.
TIA, Tiny IDE for Ada, is a console IDE for Gnat. Besides being my own program, it was written using Gnat runs using the GPL texttools packages described later in this document. The screen layout is similar to pico's, with the menu options displayed along the bottom of the screen. If you are running on the Linux console or a xterm window, you can choose the menu items with alt key combinations or using your mouse.
This IDE is designed for rapid Ada development.To meet this
goal, it uses a number of interesting features:
If you are interested in an X Windows IDE, you should read the next section on GRASP.
You can check the current file with Check. If there are errors, use Err to move to the place where an error occurred and the error message will appear on the bottom of the screen. Repeatedly use Err to fix all errors. Note that as you edit the program, such as adding or deleting lines, Err may not take you to the exact line because the lines have moved.
Build your project with Build and you're ready to run your program.
These are the key functions in TIA. If you are running TIA under X Windows, the X window manager may use some of these key combinations for its own purposes.
Control Keys Control-6 - Mark/Unmark
Control-A - Execute macro (follow with the key for the macro)
Control-B - Copy (single line or to the mark)
Control-E - End
Control-L - Redraw screen
Control-N - Page Down
Control-P - Page Up
Control-T - Backtab, back one item on screen
Control-V - Paste
Control-X - Cut (single line or to the mark)
Control-Y - Home
Navigating The TIA Screen
End - last line of text
Home - first line of text
Page Up - Up One Page
Page Down - Down One Page
Esc/F1 - TextTools' Accessories Menu
Tab - Next Item On Screen
Backtab - Previous Item On Screen (note: Linux console doesn't
support the back tab key--use control-t)
Alt-Char - Jump to the item with hot key Char (Linux
Console/xterm)
Scroll Bars Keys
Down Arrow - 10% Forward in Document End - Bottom of
Document
Home - Top of Document
Left Arrow - Back one line
Right Arrow- Forward one line
Up Arrow - 10% Back in Document
In TIA, the width of the text is limited to size of the edit area.
Any lines that are longer that the edit area are denoted with an
ellipsis at the end. The edit area does not scroll left or right as
it does in pico.
Start a new source file.
Open Source
Open a new source code window, or an existing one. Type in the name of the source file and choose open to open it. (.adb is assumed if you don't specify an ending.) Choose browse to walk through the directories using a open dialog box. Or you can chose one of the recently opened files that appear at the bottom. On the Linux console, use alt-# to open these files. Chose new and TIA will create an empty package body for you to fill in--just delete what you don't want.
Save
Saves the file. TIA automatically saves whenever you check or build.
Save As
Save As. Save the file under a different name.
Revert
Reloads the current file, discarding any changes that haven't been saved by you or TIA. (TIA automatically saves a file when a new one is loaded.)
Diff
Displays the differences between the current file and when it
was last saved using the diff
command.
Pipes the file, with a header, to the lpr command, printing it on the default line printer.
Stats
Display information about the current file and memory usage.
Stub
Creates an empty package body for the current file. The current file must be a package spec.
Check
Checks the current file for syntax errors.
Xref
Displays a crossreference of all identifiers in the current file.
Quit
Stops the program.
Deletes the selected text and puts it in the clipboard. Same as ctrl-x.
Copy
Copies the selected text to the clipboard without deleting it. Same as ctrl-b.
Paste
Inserts the text on the clipboard. Same as ctrl-v.
Append
Moves the cursor to the right end of the current line. This is useful for adding comments at the ends of lines.
Find brings up the find dialog to search for text. Fill in the top line and select find to find the next occurrence of the text in your document. Select backwards to search towards the top of the document instead of towards the bottom. Fill in the replace line and select replace to replace the text you are searching for with new text. Select cancel to erase the find text.
Next
Next finds (or finds and replaces) the next occurrence of the text in the source code.
If the text is not found, TIA beeps.
Next Err
Moves the cursor to the location of the next error and displays the error message at the bottom of the screen.
Goto
Moves the cursor to a specific line.
Brings up the macro edit screen. Macros are keyboard short cuts you define. Each macro must fit on a line.The first character on the line is the trigger, and the remaining characters are the keyboard keys the trigger represents. For example, a line "pprocedure" defines a macro "p" that represents the keystrokes "p","r","o","c","e","d","u","r" and "e".
To use a macro in TIA, press control-A and then the letter of the macro.
Options
Opens the options window. The first option is to allow background updates. Turn this option off on slow machines. The second option sets the background colour to blue or black on colour displays.
Debugger
Runs TIA's ddd-style debugger.
[Expand--KB]
GDB
This item runs the gdb debugger.
The project parameters window. Choose the debugging level, CPU type and optimization level and TIA will pass the information to gnat accordingly. You can specify additional gnatmake options (like -n for no main program in Ada when you want to call Ada subprograms from another language), linking options (such as Linux libraries you need to link to), and the name of the main program. Static binding turns static binding on and off.
CPU Options: 486, Pentium, Pentium II, Other
Optimize Options: None, Basic, Size, Speed
Debugging Options:
Project Type:
Builder:
Specify the name of the program to build the project with, usually gnatmake:
Static Linking: select this to link in all the libraries used into a self-contained executable
Egcs: select this to run egcs instead of gcc [untested]
ALT: select this to compile on a system using the ALT version of gnat
Build
TIA attempts to build the project and create a working executable file.
People
To be finished
Besides Ada 95, GRASP supports C, C++, Java and VHML source files. It supports operating systems other than Linux and can also work with Ada compilers other than gnat.
GRASP is available for download from that GRASP home page at http://www.eng.auburn.edu/grasp.
If you have a Motif compatible library, download the dynamic version to save disk space. If you are using LessTif, make sure that the libXm and related files are properly linked in /lib and run ldconfig to ensure Linux sees the changes.
export GRASP_HOME=graspdir/graspada export PATH="$PATH:$GRASP_HOME/bin"where graspdir is the directory where you installed grasp (eg./usr/local").
GRASP provides online help. Extensive documentation is provided in HTML format, but it's not lynx browser friendly. You'll have to use a GUI browser like Netscape.
The File Menu
Ada 95 et al. - opens a new source file window. Choose a language: Ada 95, C, C++, Java or VHDL.
Save all files - saves all open files.
Exit GRASP - quits GRASP, closes all open windows.
The Project Menu
New - start a new project
Open - open an exisiting project
Close - close current project
Save - save current project
Create / Save as - save current project under a new name, creating a new project.
Open Selected File- opens hilighted source file in the project window
Remove Selected Files - deletes these files from the project window
Add Files to Project - add source files to the project window
The Search Menu - search for files to add to the project
The Preferences Menu
Colour/Font - change the appearance of the source code window
Tab Size - change the number of spaces to indent when the tab key is pressed
Generate .gml files - NQS--KB
The Window Menu
Message Window - opens the GRASP error message window.
Search Window - opens the file searching window
The File Menu
Clear - erase the entire source file
Open - open a new source file
Save - save the source file
Save as - save the source file under a new name
Print - prints the source file to a postscript printer, or to a file to be printed with ghostscript
Language - change the source file language. This doesn't translate the file to a new language, but tells GRASP how the file should be hilighted.
Exit- closes the source file window
The Edit Menu
Undo - undoes last edit change
Cut, Copy, Paste - standard cut, copy and pasting text
Paste Primary - NQS--KB
Search / Replace - standard search /replace
Comment - turns hilighted text into a comment
Uncomment - removes comment marks from hilighted text
Convert Keywords to Upper/Lowercase - changes the case of all keywords in the document.
Goto Line - goto a particular line
Insert File - insert a source file into this one.
The View Menu
Show Unit Symbols - toggles module symbols in CSD diagram
Show Data Symbols - toggles data symbols in CSD diagram
Show Boxes - toggles boxes around multiline statements in CSD diagram
Intrastatement Align - If on, for statements longer than one line, the second line and onward will be indented to the position of the first open paranthesis.
Force Newlines - If on, divides up statements so they will be on separate lines.
Auto Line Numbers - toggles line number display in CSD diagram
Auto Indent - toggles indentation in CSD diagram
Line Numbers - adds line number to CSD diagram corresponding to lines in source code
Generate CSD - creates a Control Structure Diagram for source code
Remove CSD - removes CSD diagram from source code
Show Controls - toggles button bar at top of edit area
Show message Bar - toggles message bar at bottom of window
The Templates Menu - insert source code for typical Ada multiline statements. The source code must be edited to fit the current program.
The Window Menu - opens various grasp windows
The Compiler Menu
Make - builds the project using the make command defined in command setup (typically make)
Compile and Link - builds the project using gnatmake
Compile - compiles the source file without building the project
Semantic Check - checks the source code for errors
Flag Setup - configures the switches for compiling, linking, etc.
Command Setup - configures the commands to compile, link, etc.
The Run Menu
Run - runs the program using popen
Run Previous - runs the last file that was run
Run File - runs a particular file
Cleanup Session - kills any hung processes.Doesn't affect daemons.
The CPG Menu
Generate CPG - create a Compilexity Profile Graph
Weights - configure the CPG weights
Generate CSD - same as choosing View/ Generate CSD
Font Size - changes the font size
VAD is an Ada code generator written in the TCL/TK graphics scripting language. Besides gnat, there are about 10 additional packages you must install before VAD will run. You type in a TCL/TK description of a VAD widget in a text file and VAD will produce all the necessary source code to use the widget. Most graphics formats are supported. VAD is available from http://www.websamba.com/ldulman/vad.htm.
Jessie is an X Windows IDE, primarily written in Java, for building large projects and designing multiple executables at once. It's an open source project of Silicon Graphics (http://www.sgi.com) and works with multiple languages. ACT has announced that Gnat will provide Jessie support in the future. Jessie is downloadable from http://oss.sgi.com/projects/jessie.
Not complete
AdaGIDE (the Ada GUI Integrated Development Environment) is an Ada IDE for Microsoft Windows. It includes debugger support, a text editor and a code formatter. It supports Ada .Net.
For information on AdaGIDE, visit http://www.usafa.af.mil/dfcs/bios/mcc_html/adagide.html.
AdaBrowse is a HTML documentation generator for Ada 95 library
unit specs, similar to what javadoc does for Java. It's based on ASIS. For
information, see
http://home.tiscalinet.ch/t_wolf/tw/ada95/adabrowse/.
BUSH is PegaSoft's Business Shell. BUSH is a powerful shell and scripting
language designed around the POSIX standard and a scripting extension of Ada
called AdaScript. BUSH contains many built-in subprograms including database
access and network sockets and is very compatible with Gnat. Combined with
Gnat, BUSH is part of the ABEE scalable enterprise initiative providing an
end-to-end Ada solution for business. The BUSH home page is located at
http://www.pegasoft.ca/bush.html
3.4 BUSH (AdaScript Business Shell)
<--Last Chapter
Table of Contents
Next Chapter-->