leJOS Plugin for Eclipse
Outline
This plugin provides the extensions in order to interface with an
externally provided leJOS (or tinyVM) distribution.
The following extensions are availables:
- A standard eclipse preference page
in order to configure the external leJOS installation directory
and hardware parameters to access the RCX (communication port and
data transfert speed).
- A leJOS menu contribution
to the main menu in order to:
- download firmware to the RCX
- download byte-code to the RCX
- configure user preferences (actually a shortcut to the plugin preference page)
This menu is contextual to the Java editor: it only appears when editing
Java code.
- A leJOS project wizard
which extends the java wizard in order to properly configure
the build classpath.
Installation procedure
- Have a lejos distribution
installed.
- Download the following zip-bundle org.lejos_1.0.2.zip.
- Unzip it into your eclipse plugin directory.
- Go to the leJOS preference page, using
Window->Preferences->Lejos page
.
- Make the installation path point to a valid lejos installation.
You can using the directory dialog or type directly the location.
An error message will appear if the path is invalid.
Be warned that invalid location will result
in an invalid build path when initializing a Java project
using the wizard. In such case, the classpath can be corrected
by accessing the project properties and correcting the
/lib/classes.jar
entry.
- Configure the RCX tower communication port (com1, com2 or usb)
and data transfert speed. Fast mode and com1 are the default.
Use slow mode if you have data transfert problem (also check for
possible interferring lights)
Usage
- Create a new leJOS project using File->New->Project, then select the leJOS Wizard.
The wizard looks like the java wizard: just type a project name, add some library
if you wish. Don't care about the lejos libs (classes.jar, rcxrcxcomm.jar, pcrcxcomm.jar):
they will be added automatically.
- Switch to a Java perspective and create new Java files in that perspective. For now,
the leJOS menu only appears when editing a Java file. As stated before, the menu allows
you to download the firmware and the current file (which must provide a main method). It
also provided a quick shortcut to the preference page.
Limitations/TODO list
- Run on Windows & Linux
- Download progress bars are blocking the IDE
(although they are forked to a separate thread, maybe an interface issue)
- Error handling is present but could be improved.
- Method index is not captured.
- Lejos source/API doc not linked.
- My first plugin... Eclipse API certainly not best used...
Tests
Successfully tested on following config:
- windows XP, JDK1.4, eclipse 2.0 and lejos 1.0.5
- Linux RedHat 6.2, JDK1.3.1_04, eclipse 2.0 and lejos 1.0.5
History
1.0.2
- added Linux support (fixed OS-specific paths, separators, comm device names)
- bug fix in lejos preference dialog
1.0.1
- added configuration options (lejos dir, comm port&speed) in preference dialog
1.0.0
- initial release - internal
Source
Included in the distribution
Enjoy !
Feedback welcome.
chp@info.ucl.ac.be
- July 2002
- To my RCX page
- To my homepage