Managing GIS Sessions
Managing GIS sessions in MDT is one of the greatest enhancements of the environment. The most important feature is the ability to handle multiple GIS sessions based on defined runtimes. The architecture of runtimes and sessions introduced in MDT provides a very flexible way of managing access to the Smallworld GIS environment. Runtime in MDT is a definition of the Smallworld GIS runtime environment i.e. core product directory and some supporting executables required by MDT. MDT may support many runtimes at the same time.
A session in MDT is a definition of the Smallworld GIS image and assigned runtime used to run it. Each Magik project can have a single session assigned to it, in which all code held in the project is executed. GIS sessions and runtimes are liable to validation process which is responsible for finding possible problems related to their configurations. Problems are being collected and reported in appropriate views. MDT may support multiple sessions at the same time. Each session may be run independently of others in standard Run mode or in Debug mode which gives you the ability to debug Magik code related to the given session.
Session and Runtime configurations can be easily exported/imported to single files and shared between team members for better teamwork synchronization.
MDT provides three types of sessions
- Session
A standard session which configuration (image file location, session launcher parameters, environment variables) is entirely stored in MDT. - Session Link
It links to the configuration stored within existing environment and GIS alias files. MDT stores only the location of files and the name of a particular alias to run. This way of session managing gives an opportunity to work simultaneously in both MDT and Emacs. Thus it makes also session administration easier for both environments. - Command Line Session
It allows to run complex GIS session configurations based on executable files such as batch files or gis.exe. Command Line Session simply starts executable file with declared working directory and parameters. MDT provides a dedicated wizard that helps to create new session type configuration and a session editor which allows you to modify created configurations.
Session view
The Sessions view shows all sessions and runtimes defined in MDT. It contains two tabs with tree structure of available sessions and runtimes. The Sessions tab presents information about the session type, associated runtime and projects, as well as current session status and image file location. The Runtimes tab presents information about runtime type, associated session, core product and session launcher executable locations. If there are any problems after the validation of a given session or runtime configuration, then the appropriate error markers are shown. With the use of Sessions view, you can add or delete a session, start or stop selected session or open it for editing. Sessions can also be run in Debug mode which enables Magik code debugging mechanism for further use.
Cooperation with GIS sessions
The way of configuring sessions has been changed so they can better adapt to existing session configurations and don’t cause problems. New mechanisms have been implemented to allow a direct and easy switch from Emacs to MDT with existing configurations.
Session Editor
The Session Editor is used to manage all available options for a defined session. In the General section, you can edit parameters such as: session name, associated runtime, working directory etc. In Startup options section, all the information about session image and session launcher parameters can be managed. If there are any problems after validation of given session configuration then the problem or error markers are shown in appropriate places of the editor.
Session Link Editor
The Session Link Editor is used to manage all available options for defined session link. In the General section, you can edit parameters such as: session name, associated runtime, etc. In the File Paths section, all information about GIS aliases and environment files can be managed. The Preview section gives you the ability to see and override session launcher parameters, as well as read from selected alias definition. If there are any problems after the validation of a given session configuration then the problem or error markers are shown in appropriate places in the editor.
Command Line Session Editor
Command Line Session Editor manages command line session configuration. It contains Overview page, for general configuration settings and Resources page for managing resources associated with the session. In Overview you have access to General and Startup Settings. In Resources you can specify relations between Method Finder paths and local sources locations and also select projects, which will be assigned to the session.
GIS Console
The GIS Console in MDT fully reflects well known Emacs’ console, additionally extended by a couple of new features.
It has many great editing features such as:
- Automatic keywords underscoring – automatic underscoring of Magik keywords while typing a code,
- Automatic “$” appending – functionality for automatic adding of “$” execute sign after complete Magik statement,
- Double-click strategy – double-click strategy for selecting Magik identifiers, symbols etc.,
- Multi-line statements edition – ability for edition multi-line Magik statements in console,
- Code browsing – ability for browsing for selected code.
Persistent Command History
One of the extra features provided by the GIS console is persistent command history. Each defined Smallworld GIS session may have its own command history. The history stores set of commands which have been executed within the console. All histories are persistent – they are restored with every started session. The MDT provides also a special view which allows you to move/copy particular commands among the histories.
The commands may be accessed within the console in three ways:
- by means of Command History dialog,
- by means of a set of shortcuts,
- by means of Code Assist.
Code Assist
The Code Assist in GIS Console has all the features of Code Assist of the Magik Editor. Additionally it provides an easy access to commands stored in commands history of a console.
By means of Code Assist you can easily complete line of code, insert predefined template or a command from history into console.