Skip to content

Eclipse Plugin

Mike Klimek edited this page Jul 17, 2017 · 3 revisions

If you want to express your medical knowledge with Arden Syntax you can use Arden4Eclipse, an Arden Syntax Editor for the Eclipse IDE. It integrates Arden2ByteCode so Arden Syntax code can be easily written as well as executed.

Screenshots can be found at the homepage.

The repository is available at https://github.com/PLRI/ardensyntax-eclipse-plugin.

Features

The following convenient features are provided after installing Arden4Eclipse:

  • Syntax coloring
  • Error checking
  • Code completion and templates
  • Rename refactoring
  • Code formatting
  • Outline view and code folding

Installation

If you don't have Eclipse yet, you may download the Eclipse IDE for Java Developers at https://www.eclipse.org/downloads/.

You can choose between two ways of installing the Arden4Eclipse:

  • via Eclipse Marketplace (recommended)
    1. Drag and drop the following Button onto a running Eclipse window to install the Arden4Eclipse: Install Button
    2. Follow the installation procedure. When asked if you want to install unsigned software, click OK.
  • via Eclipse Update Site (more complicated, but faster)
    1. Go to HelpInstall new Software... in the Eclipse menu.
    2. Enter https://plri.github.io/ardensyntax-eclipse-plugin/update/ as a Software Site into the topmost field. Note that loading the sites content may take a while ("Pending…" entry in the list).
    3. Mark the Arden Syntax Editor and Arden2ByteCode Integration (optional) to be installed. Click next.
    4. Follow the installation procedure. When asked if you want to install unsigned software, click OK.

Using the Editor

Once Arden4Eclipse is installed, hit ctrl+n and create a new Arden Syntax Project or add a new MLM file to an existing project (Java Project, General Project, etc.). When Eclipse prompts if you want to add the Xtext Nature to the project, choose "yes" to activate the Arden Syntax Editor.

Try inserting a for-loop: Place the cursor into the logic slot, hit ctrl+space to bring up the content assist window and select for - iterate over sequence.
To rename a variable, select it and hit shift+alt+r. You can format (indent) the MLM by hitting ctrl+shift+f.

Running MLMs

To run an MLM with Arden2ByteCode, right-clicking on it and selecting Run As…Medical Logic Module.

When starting a MLM, the output should be displayed in the console window. You may also be prompted for input in that window if you programmed your MLM that way.

Further, you can edit the command line options being passed to Arden2ByteCode by creating and editing a launch configuration in the Run Configurations dialog. This dialog can be opened by right-clicking the MLM and selecting Run As…Run Configurations….

Clone this wiki locally