| This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. The article is believed to be still valid for the original topic scope. |
Contents |
The WidSets Scripting Language (WSL) is usually developed using an editor and command line.
Most developers would rather develop using a GUI type IDE that would integrate with the documentation and to use the Eclipse editing features such as line numbering and compilation from inside Eclipse using external SDK.
This article is about how to create a development environment that matches the well-known Eclipse development for Java SE.
The approach has been to copy the original runtime jre1.5.0_15 directory to make a jre0.1widset directory.
The Java Standard Edition runtime library files are deleted and replaced by the WidSet devkit\bin\devkit.jar. The devkit WidSet JavaDoc files are then linked to the devkit with the purpose of accessing the widset.api classes.
This allows the Eclipse IDE to display the documentation when the mouse hovers over a WidSet keyword like the Graphics class. The Eclipse "Project Explorer" window the functions in the Graphics class and the required parameters.
When you have installed and configured the Eclipse IDE you will have color keyword highlighting. The ability to print your code in color making the code much easier to read when you are taking a break from the screen.
The ability of Eclipse editor to collapse procedure means you can focus on specific code and print only the expanded code.
These actions are only needed once to set up each new Eclipse workspace which is created.
From the original runtime
copy jre1.5.0_15 directory to make a jre0.1widset directory. In Windows Vista
Copy C:\Program Files\Java\jre1.5.0_15 to new directory
C:\Program Files\Java\jre0.1widset
Open the Eclipse menu (Windows -> Preferences -> Java -> Installed JREs)
Click (Add -> -> (Standard VM) -> Next -> Directory -> Browse)
Navigate and select C:\Program Files\Java\jre0.1widset -> Click (Ok)
Untick the original jrel 1.6
Tick the new jre0.1widset
Click the jre0.1widset to highlight the "Edit"
Now Click the following .jar and click "Remove"
rt.jar
jsse.jar
jce.jar
sunjce_provider.jar
sunpkcs11.jar
Click the "Add External Jar"
Click "Browse" and navigate to your installation of \devkit\bin\devkit.jar. Click <ok>
Click to highlight devkit.jar
Click "JavaDoc Location"
Click "Browse" and navigation to \devkit\docs\api. Click "Validate".
Click "ok" and you see the WidSets API documentation in the web browser page
Close the web browser
Click "ok"
Click "Finish"
Click the Select Tick for the jre0.1widset. Click "ok" to leave to Eclipse Menu.
There is an article by another author which shows how to setup the
Eclipse IDE Integration compilation and SDK emulator runcommands
Now you have setup up each function as descibed in the Eclipse IDE Integration article above lets test these using Hello_world example.
Select (File -> New -> Java Project) Enter "WidSetsHello". Click (Next -> Ok)
Click on the left arrow to expand the project.
Right click on the "WidSetsHello" and select the "Import".
Click the arrow next to "General",click on the "File System", Click "Next".
In "From Directory" browse to "WIDSET_SDK:\devkit\examples\hello_world" and select hello_world.he and "Finish"
Click and highlight the hello_world.he
You have to go to (Run -> External Tools -> External Tools Configurations) and click "Run" on each task showed in the above pictures.
First to test is widset-login, Click "Run", the console will display "Login ok".
Next click "Run" on the widset-compile and will display "Compile OK"
The other functions can now be run. This is only needed once.
To compile the SDK highlight save the .he file and click on the edited .he in the project explorer. (Run -> External Tools -> 1 WidSet-compile)
The error messages from compilation appear in the console window with line numbers therefore having line numbers displayed in text would be very useful. In Eclipse menu select
(Windows -> Preferences -> General -> Editors -> Text Editors)
Click on the tick box for the item Show line numbers,then click "Apply" button
This is a probably better development environment than GNU Emacs and Java profile enabled.
When some experience is gained in using the documentation the main problem experienced will be that some functions like getimage do not appear in widset.api. The workaround is to click the API, expand and check the list. If this fails then click the Open JavaDoc External Browser and use the Index to find the item.
When typing in text the similarity to Java allows intelligent entry of variables using "Word Completion". The keys Alt + the '/' key will complete the varible of funtion name. If the "Word" in not unique keep pressing the '/' key until the right word appears, "Word Completion" is character case sensitive.
When you want to use the command line devkit again you must replace the .he file back into the devkit example directory from the Eclipse workspace project directory before you try runw
Here is an example of the documentation for the Widset API Graphics and setcolor function where by expaning the library, by clicking on the right arrow on the left of the label, of JRE System Library, then expanding devkit.jar and sliding down to widset.api and expanding the list the Graphics interface is found, expanding Graphics shows the setcolor(int) has one parameter.
.
This is not an offically supported update, and therefore any errors are not the responsibility of Nokia or WidSets or Eclipse group. While reading, please do keep in mind that both this Wiki page and the WidSets developer kit are still undergoing development, and that things are likely to change in the near future, as every WidSets release brings something new.
No related wiki articles found