-
Notifications
You must be signed in to change notification settings - Fork 72
EclipseIDE
Option 1: Add plugin to existing Eclipse IDE. Recommended.
- Make sure you have EUROPA installed and running.
- Make sure EUROPA dynamic libraries are in LD_LIBRARY_PATH (PATH for Windows and DYLD_LIBRARY_PATH for Mac) for Eclipse.
- NOTE: for Mac to recognize the library path update, Eclipse needs to be started from the the command-line terminal windows (not by double-clicking on the Eclipse icon from Mac's Finder windows)
- Download the version of the Eclipse plugin that is compatible with your version of EUROPA.
- Put the downloaded .jar file into your Eclipse dropins directory.
- Restart Eclipse.
Option 2: Build the plugin site yourself, and add plugin to existing Eclipse IDE.
- Make sure you have EUROPA installed, and running.
- Make sure EUROPA dynamic libraries are in LD_LIBRARY_PATH (PATH for Windows and DYLD_LIBRARY_PATH for Mac) for Eclipse.
- NOTE: for Mac to recognize the library path update, Eclipse needs to be started from the the command-line terminal windows (not by double-clicking on the Eclipse icon from Mac's Finder windows)
- Check out EUROPA plugin code
- Build the Eclipse plugin update site (there is an ant target for that in build.xml)
- There are two options to install:
- Copy .jar from the produced update site structure into Eclipse's dropins directory and restart Eclipse
- From Eclipse, point your update manager at the directory produced by the ant script
Option 3: Run as a separate Eclipse Application (instead of updating your Eclipse IDE).
- Make sure you have EUROPA checked out, built, and running.
- Make sure EUROPA_HOME is on your LD_LIBRARY_PATH (PATH for Windows and DYLD_LIBRARY_PATH for Mac).
- NOTE: for Mac to recognize the library path update, Eclipse needs to be started from the the command-line terminal windows (not by double-clicking on the Eclipse icon from Mac's Finder windows)
- You need the plugin to be at the root level, in order for things to run correctly. So:
- File->Import->Existing Projects Into Worspace
- Choose PLASMA/src/Java/JavaUI which will be the root directory (you now have two different 'views' into the same files in the workspace)
- Use the default name for the new 'project', which is Europa.java
- Copy PSEngine.jar from EUROPA (PLASMA/build/lib) into Europa.java/lib
- NOTE 1: Whenever EUROPA gets updated, you'll need to redo this copy
- NOTE 2: this 'copy' operation is done within the Eclipse navigation pane, not in the file system.
- Activate: Right click the newly added Europa.java project from Eclipse's Project Explorer pane, choose Run As -> Eclipse Application where you can utilize the Editor and Execution Perspective components as described below.
- NOTE: After the EclipseIDE is brought up, user may need to create an empty project in the Navigator pane (by right click on the pane, then choose New -> Project -> General -> Project). After a dummy blank project is created, user can copy in the NDDL files (good starting point is the examples) and run the NDDL file from there.
The Eclipse plugin has two major components: an Editor and an Execution Perspective.
- NDDL Editor: Syntax highlighting, syntax errors reported, structure linked to standard Outline View.
- Solver View: Start/stop the EUROPA engine, and configure and run a solver.
- Statistics View: Graphs of solver stats.
- Open Decision View: View of open decisions at each step of solving.
- Schema Browser View: View the schema for the active NDDL model.
- Gantt View: Once a solution is found, view the plan.
- Details View: Click on a token in the Gantt View to see it's details in this view.
- Run NDDL model perspective: Includes all of the above components.
Eclipse plugin registers a file type for ".nddl" and a default editor for it. The editor has syntax highlighting and an outline. The outline is updated every time an editor is saved. I am creating a brand new instance of the engine and deleting it after getting an AST tree. If the parser detects any errors, they are displayed as error markers in the editor.
Clicking in the outline navigates in the editor. Folding, control-clicking, and code assist are in future plans.
Note: I am not an artist, so complains about ugly icons will not be accepted. Better icons will be very much appreciated. (TODO Update images with new icons)
![EclipseNddlEditor] (images/EclipseNddlEditor.png)
There is a new "Run as" action that shows up for NDDL files, both in the editor and in the Package Explorer. It creates a launch configuration and switches the perspective to NDDL model execution.
![EclipseRunAs] (images/EclipseRunAs.png)
Like the Swing version, it takes a NDDL file and a planner configuration file to run. In Swing these were passed from the command line. In Eclipse plugin they are part of a launch configuration
![LaunchConfiguration] (images/LaunchConfiguration.png)
How: Right click on the -initial-state.nddl file and choose "Run As -> NDDL".
The Run as NDDL model perspective is the Eclipse version of the Swing PSDesktop user interface. The main difference is the new button that lets you start and stop the engine. The plugin can run multiple NDDL sessions at the same time. You can switch between them using the pulldown list. EUROPA sessions are also visible in the Debug perspective and can be killed or restarted from there.
![EclipseRunPerspective] (images/EclipseRunPerspective.png)
See also Developer Notes for the various EUROPA Java UI interfaces.