OmniMark Launch Configurations

To run or debug any program in Eclipse, you must create a launch configuration. Launch configurations are particular to the programming language you are using, so an OmniMark Launch Configuration is different from a Java Launch Configuration, for instance.

The quickest way to create an OmniMark launch configuration is to select Run – Debug As – OmniMark Program. This creates a default launch configuration that will run the OmniMark program without any parameters and with the default options. To set parameters and change options you must create a new Launch Configuration or edit an existing one. (Note that you can have more than one launch configuration per program. This allows you to run your programs with different options depending on the launch configuration you choose.)

To create a new launch configuration:

  1. Select Run – Debug.... The launch configuration dialog is displayed.

  2. Right click on OmniMark Application and choose New. A new OmniMark launch configuration is created.

  3. Type a name for the new launch configuration in the Name: box.

To edit an existing launch configuration, you can select Run – Debug... and select it from the list, or you can right click on the launch configuration in the Debug window and select it from the menu.

The OmniMark launch configuration dialog has three tabs, Launch, Parameters, and Common.

Launch tab

The launch tab has the following settings:

OmniMark Project
Use the Browse button to select the OmniMark project you want to run.
OmniMark Program
Use the Browse button to select the OmniMark program you want to run. (You may need to type “*” in the dialog box to see the list of files in the project.
Virtual Machine Code File
Type, or use the browse button to select, the name of the .xvc file to create when you compile your program.

Parameters tab

The parameters tab has the following settings:

Contains the command line arguments to be passed to your application. You must enter command line options exactly as they would appear on the command line. However, you may use line breaks to separate options.
Allows you to set environment variables that will be used for the run of your program. They must be entered one per line in the form of a variable name followed by an “=” sign, followed by a value (for example: dropbox=/temp/). Do not put whitespace around the “=” sign – it will be treated as part of the variable name or value. Whitespace at the end of the value will be dropped, however.
Note that your application will inherit the current environment variables in addition to those specified here. Those specified here will overwrite variables of the same name inherited from the parent environment. Variable substitution (for example, path=%path%;c:/eclipse...” is not supported.
Global properties
Checking Ignore global properties is equivalent to specifying -noea on the OmniMark command line.
Working directory
You can specify the working directory in which your program will be launched. You can specify the directory either on the local file system or in your Eclipse workspace. If you specify a local directory, it may be an absolute directory or a directory relative to the location of your .xom file. If you specify a directory in your workspace it must be specified as an absolute directory within the workspace. You can also choose to use the default working directory, which is the directory that contains your .xom file. You can see what the actual local directory used will be in the box labeled Working directory will be:.

Common tab

The common tab contains Eclipse options which are shared by many launch configurations.

Importing a project file

You can construct a launch configuration by importing a project (.xop) file from standalone OmniMark Studio.

  1. Create an Eclipse project and include your main source (.xom) file in that project.

  2. Choose File – Import.... The import dialog will appear.

  3. Choose Standalone OmniMark Studio project file and click Next.

  4. Use Browse to locate the project file you want to import.

  5. If necessary, change the name of the launch configuration from the one suggested.

  6. If more than one workspace file is listed, select the one that contains your main source file. (If none are listed, then the source file listed in the project is not in an Eclipse workspace (project). Cancel and start again.)

  7. Click Finish. The import dialog will close.

  8. Open the launch configuration window and confirm that your project file was imported correctly.

Launching a Temporary Working Copy

For a fast run, debug or compile, in the Navigator window right click either a program file ".xom" or an OmniMark project file ".xop". Then select the processing desired. The launch configurations used to do this type of processing are not permanent and therefore cannot be reused.

Using an OmniMark Program File

If the run or debug is chosen on a program file then the program is immediately lanuched. In both cases, no command line arguments provided to the program so do not use these processing options if the program expects parameterization from the command line.

If the compile option is selected then the program is byte-compiled and stored in file with the same base name but with ".xvc" file suffix.

Using an OmniMark Project File

If run or debug is chosen on a project file then the program is immediately launched and the parameters specified in the project file are passed to the program.

If the compile option is selected then the program specifed in the project file is byte-compiled. If the project file does not specify a file to save the byte codes into then they are stored in a file with the same base name as the program file but with ".xvc" file suffix. If there is a byte code file name specified then it is used.