Archived:Eclipse IDE Integration
This article uses Eclipse Ganymede.
Configuring the default editor
We'll learn how to set up the Eclipe IDE to help us with some tasks: compile, build and test Widsets.
First of all, we have to configure the default editor of *.he files to be Java Editor, like showed in the following picture.
- Go to (Window -> Preferences -> General -> Editors -> File Associations)
- Add a new file type (*.he) and associate with the Java Editor
Configuring the external tools
Now, let's configure the Eclipse to check, compile, login and emulate widsets automatically
First, You will need to create an Eclipse String Substitution variable WIDSET_SDK that points to the location where you installed Widset SDK by going to (Window -> Preferences -> Run/Debug -> String Substitution).
You'll have to create an Eclipse run configuration to execute the devkit.bat file inside the Eclipse. Let's see how to configure the following tasks: check, login, compile, runw, run and sync.
You have to go to (Run -> External Tools -> External Tools Configurations) and configure each task with the values showed in the following pictures.
Check the widget at current or referred directory.
Checks given script.
Login to widsets site.
Run the emulator using the project location as the 'source' directory. This will compile *.he files at the 'source' directory when needed and replace corresponding widget scripts at dashboard.
Before run this task, you have to run Login task.
Otherwise like run but opens a separate window for output.
Request dashboard synchronization, forces client to start sync (you should have emulator or mobile client started with Run or RunW task when calling this)
Originally published here: [http://efforts.embedded.ufcg.edu.br/wrt/?p=17 (link broken)