Skip to main content

Editing Documents

Editing documents is the primary objective of the Superbase NG IDE. As in any editor, a user can create a document and store it in a file, open an existing file, update the content before saving it, etc. There are many features in the IDE that make it easy to write and debug SIMPOL program code. Also because it is quite common today to need to work in several different languages, the IDE supports basic color coding for a number of languages, including Microsoft's Visual Basic, Visual Basic Script, JScript, and C#. Also supported are HTML, XML XSL, IDL (Interface Description Language — used for defining CORBA interfaces) and of special interest to Superbase programmers, it supports both tokenized and text format Superbase programs. This can also be extended by the user as needed simply by creating a configuration file based on one of those supplied and then adding it to the list of supported languages. A language is associated with a list of file extensions, so if we open in the editor a file with an extension associated with a language, the editor will apply the color-coding syntax rules to the document. That will show the text in the document coloring keywords, operators, etc, which greatly enhances the ability to read it accurately. The language settings can be personalized through the language settings dialog box.

The primary language used in the Superbase NG IDE is of course the SIMPOL language. There are many built-in features in the editor to handle the specific SIMPOL syntax.

The Help Valet

Many people are familiar with a technology popularized by Microsoft known as IntelliSense®. The Superbase NG IDE has a comparable technology specifically tailored to the needs of the SIMPOL programmer that we call the Help Valet. It is activated whenever there is a project loaded in the IDE and the active document is a SIMPOL document that belongs to the project. In this case the editor will take the information that the IDE retrieves from the project, in order to make it easier for the user to understand their own program. There are several Help Valet features, including: data type help, function prototype help, OnMouseOver help, and language items help. Some of the items will not provide complete functionality until after the program has been successfully built at least once. For example, it is not possible to show the members of a user-defined type until that type has been part of a build cycle of the project being edited. The same is true of user-defined functions.

Data Type Help

This is activated whenever the we append the SIMPOL property (dot) operator after an object name in the code. A list is then displayed with the properties of the object. We can use the up and down arrow keys to move through the list, or the mouse cursor to select another list property name. Another way is to begin to write the name of the property so that the property name closest to what has been written will be shown selected in the list. If we press the tab key on the keyboard, the whole property name will be appended after the dot operator.

This feature works with types nested at any level within other types. See the example below:

Example 4.1. Data Type Help

type MyType
  string s1
  integer i1
end type

function main()
  MyType t


end function "OK"


After pressing the dot key, a list will display the s1 and i1 property names.

Function Prototype Help

Function prototype help is activated when the open parenthesis character is appended after a function name in the code. A list is then displayed with the parameters of the function. Each entry in the list shows the parameter data type, its name, and even its default value (if it has one). As we add parameters to the function, the list entry selected will be moved one position down, so that the parameter that is selected in the list is the same as the one that we are currently typing. The list will be closed when we type the close parenthesis, that means that the function is not going to receive any more parameters. If the parameter list is still active, we can use the the left and right arrow keys to move to another parameter position. The parameter selected in the list will be the parameter the caret is over in that moment. If we are in a function and one of the parameters we type is another function call, the editor will show the new function parameter list, and after typing all the parameters the new function needs, the editor will show the previous function parameter list in order to continue to support the entering of parameters.

There is another way this feature can be used. If we set the cursor at any position inside a function parameter list in our program and press at the same time the keys Ctrl+Tab, a list with the parameters of the function will be displayed. The parameter entry selected will be the parameter that the cursor points to in the text. This can be very useful if there is a line in the program with many nested functions. For example:

Example 4.2. Function Prototype Help

function MyFunction(string s1, integer i1)
end function "OK"

function main()


end function "OK"


After pressing the open parenthesis key, a list will display the s1 and i1 parameters.

OnMouseOver Help

This functionality is always active. If the mouse cursor is positioned over an item in the function body of the source code, a tooltip will be shown, containing information relevant to the item below the mouse pointer if the item is a function, a type, or a variable. It is a very powerful feature and when debugging the SIMPOL program, if the mouse cursor is positioned over a variable, the value of the variable will be shown.

Example 4.3. OnMouseOver Variable Contents Help (Debugging)

function main()
    string s1, s2

    s1 = "Hello"
    s2 = s1

end function "OK"


If we move the mouse cursor over the s1 variable in this line, a tooltip will be displayed showing: string s1 = "Hello".

Example 4.4. OnMouseOver Function Prototype Help

function MyFunction(string sArg, integer iArg)
end function "OK"

function main()
    string s

    s = MyFunction("Hi", 1)

end function


If we move the cursor over the function MyFunction in this line, then a tooltip will be displayed showing: MyFunction(string sArg, integer iArg).

Language Items Help

A list is displayed of either functions or types at the current cursor position when the appropiate keys are pressed.

List Type Key Commands Description
Intrinsic types Ctrl+F7 Shows the SIMPOL language internal types.
User-defined types Ctrl+Shift+F7 Shows the types specific to the project.
Internal functions Ctrl+F8 Shows the internal functions of the SIMPOL language.
User-defined functions Ctrl+Shift+F8 Shows the functions specific to the project.