The Software AG IDL Editor is a syntax-aware editor for Software AG IDL files. A content outline view enables operations on the IDL tree. Other features include syntax highlighting, content assist and a Problems view for resolving IDL syntax errors.
To start the IDL Editor
Select an existing IDL file and open this using the context menu, or double-click on the file.
Or:
Start the IDL Editor as any other Eclipse new wizard.
Specify the name and the container of the new IDL file you want to create. The container is a project or a folder in a project. If the container does not exist, it will be created interactively. Enter the names of a first library, a first program and a first parameter to get an initial IDL file. The names and the properties can be changed later. "myLibrary", "myProgram" and "myParameter" are provided as default values.
The IDL file is then displayed in the IDL Editor. In addition to a Text view, the editor supports the following views:
In the Outline view, the structure of the IDL file is displayed in a tree structure. The nodes are the elements of the IDL: libraries, programs, structures and parameters. The context menu of the Outline view provides a variety of commands for manipulating the structure of the IDL.
Command | Description |
---|---|
New |
The |
Grouping... | Inserts a group that contains the selected parameters. |
Direction |
If a program is selected, the direction of all parameters in this program is changed. |
Duplicate |
Duplicates the selected program and creates a unique name for this program. |
Aligned |
|
Delete | Deletes the node. |
Rename | Renames the node. |
Refresh | Refreshes the whole tree, that is, makes it synchronized with the text in the editor. |
Expand All | Opens the nodes of the tree. |
Properties... | Displays the properties of the selected node. |
Drag-and-drop operation is enabled for the tree structure of the IDL file (represented in the Outline view). That is, you can drag an individual library, structure, program or parameter to a target element. You cannot drag more than one object at a time.
The table below describes the permitted drag-and-drop functions, where Drag Source is the element being dragged and the Drop Target is the element that receives the drag source.
Drop Target / | Parameter, Group | Program | Structure | Library |
---|---|---|---|---|
Drag Source | ||||
Parameter, Group | x | x | x | |
Program | x | x | x | |
Structure | x | x | x | |
Library | x |
For example, a parameter can be dragged to a structure, but not to a library.
The Properties view displays various attributes of the element selected in the Text view or Outline view. You can also edit these attributes in this view.
Property | Description |
---|---|
Alias | Alias of the library or program. |
Name | Name of the library or program. |
Preceding comment lines | Any comment in a preceding line or lines that applies to this line is displayed here. You can also add here a comment to this library or program in a definition line. |
Same-line comment | Any comment in the current line is displayed here. You can also add a comment to the current line. |
Property | Description |
---|---|
Name | Name of the library or program. |
Preceding comment lines | Any comment in a preceding line or lines that applies to this line is displayed here. You can also add here a comment to this library or program in a definition line. |
Same-line comment | Any comment in the current line is displayed here. You can also add a comment to the current line. |
Property | Description |
---|---|
Aligned | Specifies whether the current line contains an
aligned statement.
|
Data Type | Here you can select data types from a drop-down list. |
Dimension 1 | First array dimension. |
Dimension 2 | Second array dimension. |
Dimension 3 | Third array dimension. |
Name | Name of the parameter. |
Preceding comment lines | Any comment in a preceding line or lines that applies to this line is displayed here. You can also add here a comment to this parameter. |
Same-line comment | Any comment in the current line is displayed here. You can also add a comment to the current line. |
Size and precision | Size and precision of the parameter. |
Structure reference | If a structure is referenced, its name is displayed here. |
The Problems view documents syntax errors in the current IDL file, depending on the filter settings of the view. Only a document that is free of syntax errors can be displayed in the Outline view. Additionally, the line containing the error is marked with an error symbol and flagged to the right of the scrollbar.
In addition to standard editor commands such as
Undo
, Revert File
,
Cut
, Copy
,
Paste
, Save
etc., the
context menu of the IDL Editor view offers two additional commands
for shifting an element in the text: Shift Right
to
add a tab, and Shift Left
to remove a tab.
This example describes the operation of the IDL file outline context menu. These operations allow you to insert new IDL syntax elements without detailed knowledge of the syntax.
In this example we generate an IDL file by using the Software AG IDL File Wizard. The Outline view is opened (if it is not open already).
We can change the name of the library for example by selecting the library and choosing Rename in the context menu. The same applies to program and parameters.
Choose the
submenu of the context menu. To add an additional library to the IDL file, choose .A Library Properties dialog is displayed, where you can enter the name of the library, the alias and comments.
Select a parameter and choose Properties in the context menu. In the Parameter properties dialog you can set all required properties.
The properties of libraries, programs and structures are changed in a similar way.
To group these two parameters, select both parameters and choose
in the context menu. This inserts a new group into the program. The new group contains the two parameters.In the Parameter Properties dialog box you can enter all the settings required for this group.