Using the Software AG IDL Editor

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.


Starting the IDL Editor

Start of instruction setTo 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.

graphics/startIdlEditor.png

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.

graphics/newIdlFile.png

The IDL file is then displayed in the IDL Editor. In addition to a Text view, the editor supports the following views:

graphics/idlViews.png

IDL Editor Views

IDL Editor Outline View

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.

graphics/idlEditorOutline.png

Context Menu of the Outline View

graphics/outlineViewContext.png

Command Description
New
  • Library
    Inserts a library before the selected library. Enabled only for libraries.

  • Program
    Inserts a program at the first position of the current library if a library is selected. If a program is selected, a new program is inserted before the selected program. The same applies if a structure is selected. If a parameter is selected, a new program is inserted before the program or structure containing the selected parameter.

  • Structure
    Inserts a structure at the first position of the current library if a library is selected. If a program is selected, the new structure is inserted before the selected program. The same applies if a structure is selected. If a parameter is selected, a new structure is inserted before the program or structure containing the selected parameter.

  • Parameter
    Inserts a new parameter at the first position of the current program or structure if a program or structure is selected. If a parameter is selected, the new parameter is inserted before the selected parameter.

The New command applies only to single selections.

Grouping... Inserts a group that contains the selected parameters.
Direction
  • InOut
    Changes the direction to InOut.

  • In
    Changes the direction to In.

  • Out
    Changes the direction to Out.

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
  • On
    Parameter is aligned.

  • Off
    Parameter is not 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.

Outline View Drag-and-Drop

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.

IDL Editor Properties View

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.

graphics/natIdlProps.png

Library and Program

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.

Structure

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.

Parameter

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.

IDL Editor Problems View

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.

graphics/idlProbs.png

Context Menu of the IDL Editor

graphics/idlEditorContext.png

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.

Editing an IDL File from the Outline View

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).

graphics/OutlineView.png

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.

graphics/RenameLibrary.png

Adding a New Element

Choose the New... submenu of the context menu. To add an additional library to the IDL file, choose Library.

A Library Properties dialog is displayed, where you can enter the name of the library, the alias and comments.

graphics/NewLibrary.png

Select a parameter and choose Properties in the context menu. In the Parameter properties dialog you can set all required properties.

graphics/ParameterProps.png

The properties of libraries, programs and structures are changed in a similar way.

Grouping

To group these two parameters, select both parameters and choose Grouping in the context menu. This inserts a new group into the program. The new group contains the two parameters.

graphics/Grouping.png

graphics/NewGroupParmProps.png

In the Parameter Properties dialog box you can enter all the settings required for this group.

graphics/GroupSettings.png