MDT is an abbreviation of Magik Development Tools.
All requirements are listed in MDT Help. Go here to learn more.
There are
some ways of installing MDT. You can use all ways available in Eclipse. We
recommend the following approaches:
1. Installing from the Internet:
a. Start an update manager: Help/Software Updates/Find and Install...
b. Select the searching for the new features option.
c. Add “New Remote Site” where the MDT is located. The name of the Site is
irrelevant, you can name it as in an example “MDT”, the URL
“http://www.mdt.net/pe/updates/” is crucial.
d. Choose the MDT to be installed.
e. Accept the license agreement.
f. After accepting the license agreement the installation in your Eclipse is
ready to start.
g. You have to accept that you want install the MDT (Magik Development Tools)
feature created by ASTEC Sp. z o.o.
h. Restarting Eclipse is the last step in the installation process.
2. Installing from the local files:
a. Download the latest version of MDT from the http://www.mdt.net website. The file is a zip file.
Save this file in your local file system.
b. Start the update manager: Help/Software Updates/Find and Install...
c. Select the searching for the new features option.
d. Create a “New Archived Site”. You will be asked for the zip file. Please
enter the zip file you downloaded in the Step 'a'.
e. Choose the MDT to be installed.
f. Accept the license agreement.
g. You have to accept that you want install the MDT (Magik Development Tools)
feature created by ASTEC Sp. z o.o.
h. Restarting Eclipse is the last step in the installation process.
To update
MDT from the internet proceed as described here. You have to have MDT Update site (http://www.mdt.net/pe/updates) added to Eclipse Update site list.
To update MDT from the downloaded archive file (plug-in/site) proceed as
described here.
!!! Ensure that you have valid Annual Maintenance Services that cover the
update's release date. !!!
MDT
supports a special type of session, called Session Link, that enables
running a session based on existing aliases.
New Session Link wizard allows you to create many sessions at the same time.
The choice of aliases, which are a base for creating sessions, is supported
thanks to the definitions of products stored in LAYERED_PRODUCTS file.
To start the Session Link MDT uses the application launcher (gis.exe) that has
been given in the Runtime assigned to the session. In addition, Session Link
editor allows you to customize: image file, working directory and session
launcher parameters.
Remember
that prompt can be not visible if a session doesn't return any output or if it
returns _false value from startup() procedure.
To force prompt in the Console you should proceed differently for different
types of sessions (changes will apply after restarting the session):
- standard Session - edit the session and mark the Force command line
[-cli] checkbox in Startup Options, in Overview tab
- Session Link - edit the session and go to the Overview tab. Mark the Use custom checkbox. In text field type -cli.
- Command Line Session - edit the session and go the Overview tab. Depending on the used executable file modify fields: Executable file or Command line parameters.
If you
prefer working with default Emacs shortcuts you can easily switch to the
predefined Emacs scheme. Open workbench preferences (Window->Preferencess…->General->Keys),
select Modify tab and in the Scheme combo select Emacs.
Close preferences dialog by pressing OK button.
Learn more about MDT's shortcuts in MDT Help.
There are 3
ways of running MDT with different than default JRE:
1. Run eclipse.exe with -vm parameter and
specify location of appropriate JRE e.g.:
eclipse.exe -vm "C:/Program
Files/Java/jre1.6.0_03/bin/javaw.exe"
2. Copy particular JRE (i.e. jre1.6.0_03 from C:/Program
Files/Java standard installation folder) to Eclipse
directory. After that you have to rename it to jre. During
startup Eclipse will consider JRE files from this directory.
3. Add a switch with path to a particular JRE in eclipse.ini
file. For example:
-vm C:/Program Files/Java/jre1.6.0_03/bin/javaw.exe
In some
cases (e.g. transmitting a file) virtual machine may send a lot of messages to
the GIS console. As a result the Console view is activated each time when new
message arrives and there is no possibility to do anything else in the MDT
until it is finished.
If you are not interested in being notified about each new virtual machine
message just uncheck Show when program writes to standard out option in
the console preferences (Window->Preferences->Run/Debug->Console).
From now on if the console receives new message it will not activate and its
title will become bold.
The SMALLWORLD_GIS environment variable is handled internally by MDT and there is no need to define it in a runtime or a session. The variable's value is set automatically to the location of Core product directory while starting a session (the Core product directory location is stored in the Runtime assigned to the session).
Since one of the first versions of MDT, the GIS command history for given session has become persistent. It means that the command history will not be lost after stopping or restarting connected session. All unique commands are saved and stored for the whole session's lifetime. Additionally command histories are restored with every launch of MDT.
You
can access previously executed commands in GIS console using:
- the well known Emacs shortcuts - you can either review or filter commands
from history as it was done before.
- Code Assist in GIS Console, which except for common hints gives you
also proposals from the list of previously executed commands
- Command History dialog which allows to access commands history of
other sessions as well,
Or by using GIS Commands Managing perspective and Command Histories
view. They give the ability to manage and customize command histories for
multiple sessions (like moving commands from one session’s history to another).
MDT Help links:
- GIS Console
- GIS Console shortcuts
- Command History dialog
- Command Histories View
MDT Professional Edition supports Smallworld™ Core Spatial Technology 3.2.1, 3.3, 4.0, 4.1.x, 4.2.x and 4.3.
PROBLEMS WITH MEMORY THAT IS ERROR 'Java heap space
(java.lang.OutOfMemoryError)'
Conventionally when being run, Eclipse assigns a heap of 256MB to a Java
virtual machine. In case the workspace contains large resources (their total
size is over e.g. 1GB) after a longer work with MDT, the virtual machine may
report our of memory error.
In case of large projects Eclipse Help suggests enlarging Java virtual machine
heap do e.g. 512MB. It can be performed in two ways, and in both cases it is
done by changing the following parameters:
The -Xms and -Xmx parameters can be set to the same value
which eliminates the need for heap enlargement. The -Xms value cannot be
larger than -Xmx value because the MDT will not run then. In case -Xmx
exceeds the physical size of available RAM memory the Java virtual machine can
start using the virtual memory which is non-effective.
The -Xms
and -Xmx values can be defined:
In both cases -vmargs parameter cannot be
forgotten as it divides eclipse.exe and Java virtual machine parameters.
Because of that -vmargs parameter and the following parameters after it
need to be placed always at the end.
PROBLEMS WITH LONG WORKSPACE REFRESHING DURING EVERY STARTUP
By default Eclipse refreshes all of the workspace resources during every
startup. If user has linked core product folders (or any other large folders)
to Magik projects then the refresh process may take a long time.
In order to omit that issue uncheck Refresh workspace on startup option
in workspace preferences (Window->Preferences...->General->Startup
and Shutdown).
Log file(s)
is located in /workspace/.metadata/ directory. If you want to know the
direct location check Configuration Details dialog (Help > About Eclipse
SDK > Configuration Details) and look for osgi.logfile entry
i.e.:
osgi.logfile=C:\MDT\task1112\.metadata\.log
In the same directory you may find older log files, named .bak_X.log
(where X is a number of log file). The older files can be used if the problem
occurred in the past.
Sending us the log file(s) please specify the estimate time the problem
occurred. This will help us to faster locate appropriate log entries.
To activate your license you have to connect to
license server over standard HTTP protocol.
If you have no access to license server, you will receive a following message:
No connection to license server.
Also there is a problem using JRE 6 updates 1 to 3. If you are using JRE
6 make sure you have at least update 4. It may be necessary to uninstall older
updates.
If you have JRE 6 updates 1-3 or other unexpected error occurs, you will
receive a following message:
Activation failure.
Another possible
problem with activation is proxy settings.
If you are using proxy you have to enable it in Eclipse. You have to
enable HTTPS to activate license. To change proxy settings go to Windows
> Preferences > General > Network Connections.
In case
your license expires (trial) and pop-up window starts appearing you can disable
MDT to keep working with your Eclipse.
There are two ways to accomplish that:
First:
1. Switch your current perspective to one not related to MDT (i.e. Resource)
2. Close all views and windows related to MDT.
3. Restart Eclipse (File-->Restart)
Second:
1. Uninstall MDT plug-in
Below a
list of debugger's limitations. Most of them are caused by the
limitations of Smallworld’s Virtual Machine itself.
1. Debugging is possible only for Smallworld 4.1 and higher.
Smallworld's Virtual Machine simply does not support debugging in older
releases.
2. Debugger can be used only with methods, never with procedures or
blocks of code.
3. Method’s comment can be not restored after installing a breakpoint –
it happens only when the file has no '_package' definition. Moreover if
a method is located in a different file than the declaration of a class, '_package'
definition for this method should be the same as for the class.
4. Multithreading – two or more threads cannot be suspended on a single
breakpoint at the same time. If two or more threads are running only the first
will be suspended, the other ones will continue running.
5. Loading Coverage Analyzer to the session running in Debug mode can
cause the session to hang unless a specific patch is applied. Only then, Coverage
Analyzer can be safely loaded and used, but never on the same classes/methods
as MDT Debugger.
6. Breakpoint cannot be installed in the same line as result
statement ( '>>' chevron). A quick
solution is to change '>>' into '_return'.
7. Debugger hangs or slows down significantly in case of very large methods
(a couple of hundred lines or more).
8.It is not recommended to save the session running in Debug mode to an
image file.
9.It is not recommended to simultaneously debug the same methods in MDT
and Very Simple Debugger. Breakpoints can get invalid during tool switches.
While
installing MDT on Windows 7 (or Vista) the installation process is done with
full administration rights and MDT is usually installed within C:\Program
Files (x86)\MDT Professional Edition folder. MDT is later launched with
specific user rights so Eclipse takes into account different than default
configuration. Such configuration does not contain information about available
update sites (this information is provided in default configuration).
To solve this problem run your MDT installation with administrator rights
(right-click on mdt.exe and select Run as administrator command). Go to "Available
Software Sites" preference page. Select all sites and export them to a
file. Later run MDT again but with common user rights and import those sites
from the file.
You can also install MDT into a non-default folder, which you have full access
rights to. In this case MDT will use default configuration when run.
This problem is common to all Eclipse installations and will be hopefully
solved soon by the community.