Skip to main content

Control Bars

Control bars are a set of windows that share a common level of functionality. At the bottom of any control bar there is a tab control that allows easy selection of any window owned by the control bar. There are four different control bars in the Superbase NG IDE: the Project Space control bar, the Output Windows control bar, the Call Stack control bar, and the Variables control bar. The Project Space control bar is the most complex and that will be covered first.

The Project Space Control Bar

This control bar has two windows. They show information for the project that is currently loaded into the IDE. The content of both windows is updated after any project is built.

Project View

In this window the files that make up a project are shown as a tree. The root node is always the project node. The name of the node is the name of the file that contains the information for the project. The extension of the project file is always smj, for example: MyProject.smj.

The child nodes are the modules. There is one module node for each module directory in the project file structure. The name of the module node is the module directory name. There are two types of modules, project modules and imported modules. Project modules are modules that belong to the project and that are built as part of the process of building the project. Imported modules are modules that belong to other projects. When we add a module to the project a new module directory is created in the project file structure and a new main source code file is created for the module. When we import a module, what the IDE does is add a link to a module that is located in another project.

In the example used in the previous chapter, we had two module nodes: MyFile1 and MyFile2. A module node always has a child node, which is the main source code node. The name of this node is the same as the name of the main source code node file. This node will have as many child nodes as it has included files. And each of the child nodes will have as many child nodes as they have included files and so on.

In a CGI project we will have the Server Pages node as a child node of each module. This node looks like a folder and it will contain all the server pages of the module. The Server Page nodes have the name of the server page file (a file with a smz extension). Each Server Page node will have as many child nodes as there are files included in each server page and so on as in the case of the SIMPOL source code files. Server page child nodes are normally files with any extension and that contain chunks of html code.

Project Tree View Nodes

Double-clicking on a source code node or server page node, causes the associated file to be opened in the editor. Right mouse button clicks on any node displays a menu of options specific to the type of node that was clicked on.

The Project Node

This is the root node and it represents the entire project.

Table 4.1. Menu Options

Menu Item Description
Add New Module Opens a dialog box to create a module in the active project.
Import Module from Project Opens a dialog box to select another project. This is done by selecting the smj file. This will add a link to the active project for each module in the external project. The files of an imported project are be read only, since the active project is not the owner. An imported module node has a different color than the project nodes.
Build This launches the Build process. The messages generated by the process will be displayed in the output window.
Rebuild All This launches the Rebuild All process. This will rebuild all portions of a project even if normally they would not need to be built. The messages generated by the process will be displayed in the output window.
Execute This executes the project. If it needs to be built first, then it will be built prior to execution. The messages generated by the process will be displayed in the output window.
Settings Opens the Project Settings dialog box.
Properties Opens the Properties dialog box. In this case, the description of the project file path, the date of last modification of the file, and the path of the byte-code file that is generated as a result of the project build are shown.
The Module Node

There are two types of module nodes, project nodes and imported module nodes. They are shown in different colors.

Table 4.2. Menu Options

Menu Item Description
Rename Module Available only for the project modules. This opens a dialog box to change the name of the module and the name of its main source code file.
Remove Module If the node is an imported module, the link to the module from another project will be removed. If the node is a project node, a dialog box to remove the module will be opened. The dialog box includes an option to remove the module folder and all of its contents.
Create SIMPOL File Available only for the project modules. This opens a dialog box to create an empty source code file within the module.
Properties Opens the Properties dialog box. In this case, the module folder path and the date of last modification of the module are shown.
The Main Source Code Node

This represents the main source code file. It is the root of the source code files of the module.

Table 4.3. Menu Options

Menu Item Description
Open File Opens the file in the editor.
Compile File The file is compiled.
Execute File The compiled file associated with the main source code file is executed. If necessary, the source will be compiled first.
Properties

Opens the Properties dialog box. There are two tabs. The first one displays the file path, the date of last modification of the file, and the location of the byte-code file after compilation. In the second tab we can see a list with all of the files that are included in the module. If is there a circular path when including files, then the wrong path is shown in this tab.

An example of a circular path might be: file A includes file B. File B includes file C and file C includes File A.

Source Code Nodes

This represents a source code file. These are all of the sma or smu files that are not the main source code file of a module.

Table 4.4. Menu Options

Menu Item Description
Open File Opens the file in the editor.
Delete Shows a dialog box and asks for confirmation to delete the file and remove the reference to it in the project.
Properties Opens the Properties dialog box. This dialog box displays the file path and the date of last modification of the file.
Regenerate Server Page

This is available only for the source code files that are the output file of a server page file compilation. If the source code file has been modified, the regenerate process regenerates the associated server page, so that the output of the process is the server page file.

For example: MySPFile.smu — regenerates to —> MySPFile.smz. This is useful when in a server page there is a large block of SIMPOL code. A server page is essentialy a HTML page with blocks of embed SIMPOL code. So the editor applies the HTML color coding rules to the document. If we want to have the advantage of the Help Valet with the SIMPOL language portion of the server page, then we have to work with the SIMPOL source code document generated after the compilation of the server page. We can modify the SIMPOL source code in the source code document and take advantage of the help of the SIMPOL color coding rules and the context-sensitive Help Valet, and then we can regenerate the server page and continue working in the server page on the HTML.

Server Pages Node

This node represents the group of all the server page files in the module. These files are located in the module directory.

Table 4.5. Menu Options

Menu Item Description
Create New Server Page Opens a dialog box to add a new server page file to the module.
Reload Server Pages Load all of the module server pages as child nodes of the Server Page nodes.
Server Page Node

This represents a server page file.

Table 4.6. Menu Options

Menu Item Description
Open File Opens the file in the editor.
Compile File The server page is compiled.
Delete Shows a dialog box and asks for confirmation to delete the file and remove the reference to it in the project.
HTML Viewer Opens the HTML viewer and loads the server page into it.
Properties

Opens the Properties dialog box. There are two tabs. The first one displays the file path, the date of last modification of the file, and the location of the byte-code file after compilation. In the second tab we can see a list with all of the files that are included in the server page. If is there a circular path when including files, then the wrong path is shown in this tab.

An example of a circular path might be: file A includes file B. File B includes file C and file C includes File A.

Other Nodes

This node represents any node related to a file with an extension other than smj, smu, sma, or smz. Typically, it is a file with a block of HTML that is included in a server page.

Table 4.7. Menu Options

Menu Item Description
Open File Opens the file in the editor.
Delete Shows a dialog box and asks for confirmation to delete the file and remove the reference to it in the project.
Properties Opens the Properties dialog box. This dialog box displays the file path and the date of last modification of the file.

Type View

This window displays the content of the project library files in a hierarchical or tree layout. A library file or library is the byte-code file generated after compilation of a modules main source code file or after the build of a project. So a library is always a file with the extension smp or sml. In the type view tree there is a library node for each library in the project. Each library node has a child node for each function and for each type that is in the library. Each function node also has a child node for each argument of the function. The first child node is the first argument, the second child node is the second argument and so on. Each type node has a child node for each property and method. As with the functions, each method has a child node per argument.

Type View Nodes
Library Node

A library node represents a link to a library file.

There are three types of libraries:

  • SIMPOL language library

  • Project module library

  • External linked library

SIMPOL Language Node

This node contains the internal type and function information for the SIMPOL language. For example, function .toval or type cgicall. The label for this node is <smpol>.

Project Module Nodes

There is one node of this type for each module in the project or imported module. These libraries contain the information about all of the exported and non-exported functions and types. The name of the node is the name of the library file, for example: MyLibrary.sml. If the right mouse button is clicked on this type of node then the library file path and date of the last modification will be displayed.

External Module Nodes

This contains the information about all of the exported functions and types from an external library. The external library is linked to the project output file, when the project is built. The name of the node is the name of the library file and is shown between angular brackets. If the right mouse button is clicked on this type of node then the library file path and date of the last modification will be displayed.

Function Node

A function node represents a link to a function description. It also represents a library function if it is a library child node, or a type method, if it is a type child node.

Type Node

A type node represents a link to a type description.

Element Node

An element node represents a link to an element description. An element can be a type property, a function or method parameter, or a type tag.

The Output Windows Control Bar

This is the location where the IDE communicates results to the user.

Output Window

This window displays information generated by the application in general. For example, the messages generated by a build, or the results of an executed SIMPOL program are shown in this window.

Debug Window

This window displays information generated by the debugger.

Find in Files Window

This window displays information generated by the Find in files process. It displays a line for each match found. In each of those lines is shown the file path and the line where the match was found. If we double-click on a line, the file will be opened in the editor and the line where the match was found will be shown.

The Call Stack Control Bar

This is active only when the debugger is running and the thread with the focus is suspended. This is a read-only window that displays the stack of function calls of the thread that is suspended. The bottom function is always the first function the thread began to execute. If the thread is the main thread ("Thread 1"), this function will be main. The top function is always the function where the execution pointer is currently located. Double-clicking on a line in the Call Stack window will cause the source code line that is displayed to be executed. That source code belongs to the function selected in the Call Stack window.

The Variables Control Bar

This is active only when the debugger is running and the thread with the focus is suspended.

The Locals Window

This window is a table with two columns. The first column is Name and the second Value. This table shows the name and the current value of the local variables for the function selected in the Call Stack window. The function can be changed if we double-click on another function in the Call Stack window. By default the local variables that are shown are from the function in which the execution pointer is currently located.

The Me Window

This window is also a table with two columns. The first column is Name and the second Value. This table shows the name and the current value of the properties of a type if the function currently selected in the Call Stack window is a method of a type. The method can be changed if we double-click on another method in the Call Stack window. By default the type properties that are shown are from the method of a type in which the execution pointer is currently located.