OmniMark Studio for Eclipse Quickstart

This document is intended to get you up to speed on the essentials you will need to know to use OmniMark Studio for Eclipse.

Eclipse

There are two basic things you need to understand about Eclipse.

  • It is designed as an environment, not as an application.
  • It is a shared environment in which different tools share real estate as well as the common facilities provided by the Eclipse platform.

Eclipse as an environment

Eclipse is designed as an environment, not an application. For instance, you cannot open a file in Eclipse. Instead you must import the file into the Eclipse environment. When you do import a file, you must import it into an existing Eclipse project, and this will result in the file being copied into the Eclipse workspace for that project. Eclipse's state is persistent. When you shut it down and re-open it, the entire state of the environment when you shut it down will be restored, right down to breakpoints in your code. If you want any project or resource to go away, you must explicitly delete it from the environment.

The Eclipse environment has a distinct set of user interface conventions consisting of views, perspectives, and editors. You should familiarize yourself with these conventions and read the Workbench user's guide in the Eclipse documentation.

Working in a shared environment

Eclipse is a shared environment, so OmniMark Studio for Eclipse shares facilities and real estate with other development tools in the environment. This includes the project navigator, the launch configuration system, the search facility, and much of the debug facility. This means that you have a very rich set of tools available to you in the Eclipse environment, but they are not all necessarily part of OmniMark Studio for Eclipse, and they don't all serve a useful function in OmniMark programming. We have done as much as possible to hide features that are not useful to you by creating OmniMark editing and debugging perspectives in Eclipse, however, you will still run across some of them in the environment.

The default installation of Eclipse comes with a Java programming environment. If you are already using Eclipse, you may have other plugins loaded as well. However, the presence of the Java programming plugin is pervasive. It shouldn't get in your way while using OmniMark Studio for Eclipse, but you will be aware of its presence. In particular, you will notice that the documentation for the Eclipse debug environment exists in the Java Development documentation rather than the base Eclipse documentation. We are working with the Eclipse organization to determine if some of these issues can be resolved more cleanly.

Standalone Studio vs. Studio for Eclipse

Standalone OmniMark Studio includes a complete set of editing, debugging and project control features. OmniMark Studio for Eclipse takes advantage of the facilities provided by the Eclipse environment wherever possible. The following table summarizes the major differences:
Feature Standalone StudioStudio for Eclipse
OmniMark ProjectA project is the encapsulation of the command line used to run the program. Eclipse provides a launch configuration in which you can specify the command line parameters of the program. You can create and edit launch configurations by selecting "Run�" or "Debug�" from the "Run" menu, or using the equivalent button on the tool bar.
Eclipse projectIn standalone Studio there is no concept of a project in the sense of a group of files that belong together. In Eclipse, everything is a project, and a project is a file structure and includes all files within that file structure. To begin a program, you must create a project using "New�" on the "File" menu. You can import existing files into your project using "Import" on the "File" menu.
Eclipse workspace Standalone Studio has no concept of a workspace. You simply work in the file system. Eclipse maintains its own workspace. See the Workbench documentation for more information.
Run the current program file In standalone Studio, you can run the "Active Window Project" without creating a project file. In Eclipse, you can run a program without creating a launch configuration by choosing "Debug as�" from the Run menu or the Debug button and then selecting "OmniMark program"
Open a file You can open any file in Studio. You must import a file into the Eclipse environment before you can view or edit it.
Preferences Edit - Preferences Select "Windows" -> "Preferences�" and choose OmniMark from the list.
Compile XVC File -> Create Virtual machine Code File File -> Export -> OmniMark bytecode export Wizard
Debugging Hit the Start button or choose Start Debugging from the Run menu. In the OmniMark edit or debug perspective, choose either the Run or Debug buttons on the tool bar or choose Run of Debug from the Run menu.
Program output The log window captures both the standard output and standard error output from the program. The console window captures both the standard output and standard error output from the program but displays them in different colors.
Finding compile time errors Click the error flag on the tool bar or choose "Next Error" from the Search menu. Errors are displayed in the task window. Select the error to move to it in the edit window.
Breakpoints Click in the left margin to set or clear a breakpoint. Breakpoints are lost when you close the file or close Studio. Right click in the left margin and choose "Add breakpoint". Breakpoints are persistent from one Eclipse session to another.
Variables and datascopes. Select from the view menu.Select the appropriate window in the OmniMark debug perspective. Some Java specific windows may be visible but inactive. Some windows, such as the breakpoints window, are shared. If you debug a Java program and an OmniMark program at the same time, they will share this window.
Throttle Allows you to control the speed at which your program executes. Select from the View menu. There is no throttle in OmniMark Studio for Eclipse.
Stepping The stepping buttons on the debug toolbar let you step through your program one action at a time. The stepping buttons in the debug window let you step through your program one action at a time. Some Java specific stepping buttons may be shown, but should not be enabled.
Running multiple programs In standalone Studio, you can only run or debug one program at a time. If you need to run more than one program at once, (for instance, to debug a client and a server) you can open two copies of Studio. In Studio for Eclipse, you can run/debug multiple programs in parallel. You can only open one copy of Eclipse, however you can spawn a new Eclipse window using Window -> New window.
Execute at full speed. By default, standalone Studio runs a program in debug mode, which is slow. You can run at full speed (without debug information being tracked) by choosing "Execute project" from the Run menu. In Studio for Eclipse, you can choose either to Run a program or to Debug it using either the Run menu or the tool bar buttons.
Documentation Standalone Studio includes full OmniMark language documentation in WinHelp format. Studio for Eclipse includes full OmniMark language documentation in the Eclipse help system.

Tutorial

Here is how to create and run your first OmniMark program in OmniMark Studio for eclipse:

  1. Start Eclipse.
  2. Choose File -> New -> Project. The New project dialog is displayed.
  3. Select OmniMark -> OmniMark Project, and click "Next".
  4. Enter the project name: "Hello" and click "Finish". You will be prompted to switch perspectives to an OmniMark perspective.
  5. Click "Yes". The OmniMark perspective is displayed.
  6. Right click the project folder in the "Navigator" window and choose New -> File. The "New File" dialog is displayed.
  7. Enter the file name "hello.xom" and click "Finish". An editor window opens.
  8. Type in the following program: process output "Hello " || #args
  9. Choose "Debug�" from the Debug button or the Run menu. The "Debug" dialog appears.
  10. Choose the OmniMark project "Hello" and the OmniMark program "hello.xom".
  11. Select the "Parameters" tab.
  12. Select the "Arguments" tab.
  13. Type in "World" and click Debug. The Save Resources dialog is displayed.
  14. Click "OK" The program runs and outputs "Hello World" to the console window.
Copyright © Stilo International plc 2003. All information on this website is protected under Stilo's copyright. OmniMark and the OmniMark swirl logo are registered trademarks of Stilo Corporation, and Stilo is a trademark of Stilo International plc. All rights reserved.