You Are Here:

Community: Wiki

This page was last modified on 3 August 2009, at 10:31.

Integrating WidSet SDK and API documentation into Eclipse

From Forum Nokia Wiki

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

Introduction

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.


Setting up WidSet API documentation

These actions are only needed once to set up each new Eclipse workspace which is created.

  • Create a new Widset runtime library

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

  • Install the new Widset library

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"

  • Remove conflicting java.awt libraries

Now Click the following .jar and click "Remove"
rt.jar
jsse.jar
jce.jar
sunjce_provider.jar
sunpkcs11.jar

  • Add the WidSet API library from the devkit .jar image

Click the "Add External Jar"
Click "Browse" and navigate to your installation of \devkit\bin\devkit.jar. Click <ok>
Click to highlight devkit.jar

Image:WidsetDevKitInstall.jpg

  • Link the WidSet JavaDoc to the WidSet API library in 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"

  • Enable the WidSet Libary as the default when making new projects

Click the Select Tick for the jre0.1widset. Click "ok" to leave to Eclipse Menu.

Setting up the runtime SDK from inside Eclipse IDE

There is an article by another author which shows how to setup the Eclipse IDE Integration compilation and SDK emulator runcommands

Setting up the hello world project

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


Testing the External Tools

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.

Using the External Tools

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)

Enable line nunbers in Eclipse Editor

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

Using the Eclipse to develop Widsets

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

Summary

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.

Image:WidSetIDEjavaDoc.jpg

.

Disclaimer

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.

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fTalkE3aE4cargeE5fscreenE5fsaverX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ
User Rating: qfnZuserE5FratingQNx3E2E0000X