Mobile Widgets SDK manual

This part aims to describe the Mobile Widget SDK Plug-in. This plug-in, once integrated in the Eclipse platform, provides tools for Mobile Widgets creation, compilation, export and emulation.

The following points will be detailed:


Before you install the plug-in, make sure that your development environment fits the following requirements:


From eclipse folder, launch " eclipse.exe " file to open Eclipse.
There are four ways to create a new Mobile Widget Project: from the Toolbar, the New Widget Project menu or the New Project... menu.

Launch " New Mobile Widget " from the Toolbar

Widgets SKD

Click on the " New Mobile Widget " button on the Toolbar (marked in blue).

Launch " New Mobile Widget " from the New Widget Project menu

Widgets SKD

In top menu bar, 2 possibilities:

Or

Launch " New Project " from the Toolbar

Widgets SKD

Click on the " New " button on the Toolbar (marked in blue).

Launch " New Project " from the New Project... menu

Widgets SKD

In top menu bar, 2 possibilities:

Or

Widgets SKD

" New Project - Select a wizard " dialog box is opened.
Select " Widget Project " under " Mobile Widgets SDK " folder.
Select " Next > " button to continue.


The New Mobile Widget Wizard

Widgets SKD

" New Mobile Widget Project - Create a new Mobile Widget Project " dialog box is opened.

Widget Type

The Widget Type is defined here. As indicated on the wizard page, there is two choises:

Widget Configuration

First of all, the global parameters fields have to be filled in. Here is a short description of these parameters:


VRML Model usage

Widgets SKD

Widgets SKD

" New Mobile Widget Project - Choose VRML Model " dialog box is opened.

The new Widget Project is built from an existing VRML model.
These models are functional and provide sample code.
The VRML model to use is selected on the second page of the wizard.
A short description and a screenshot of the selected item are displayed on the right.
When a model is selected, the Widget project creation is completed.
You can click on the " Finish " button.

A complete Widget Project is created.
It is fully functional and can be run once created by using Run As > Mobile Widget.
Its sources can be used as a starting point for another application or just to provide code samples.


Project structure

A newly created project has the following structure:

Widgets SDK Manual

Sometimes, a " README.txt " file is present.
It contains a description of the model as well as information that can be useful.


Widgets SKD

Depending on the selected widget type, the project icon in the Eclipse workspace is different:


Global preferences

Widgets SKD

In top menu, select " Window " then " Preferences ".


Widgets SKD

" Preferences " dialog box is opened.
Select " Mobile Widgets ".
You can configure :

Widgets SKD

In order to generate the widgets documentation, you must provide the path where Perl is installed.
Specify the path in the " Perl bin directory: " textfield.
By default, this textfield is completed by C:\Perl\bin.

Widgets SKD

In order to sign Applets and MIDlets, you must provide a keystore and other data, as an alias, a storepass and a keypass.
If the checkbox is checked and correct data are entered in the different textfields, the Applets and/or the MIDlets will automatically be signed when created.

Widgets SKD

In order to package Widgets for BlackBerry phones, some properties must be set. The version is mandatory and must be selected in a list.


Project preferences (Properties)

The project preferences page allows modifying the Widget version and the Widget style after the project creation.


Widgets SKD

2 possibilities:

Or


Widgets SKD

" Properties for MobileWidget - Widget preferences " dialog box is opened.
The " version " and the " SDK " of the selected project are displayed.
They can be modified and taken in account by the project.
WARNING: Only advanced users should modify the SDK.


There are three different ways to run the Mobile Widget.


" Run Configurations " for running the Mobile Widget

Widgets SKD

In top menu bar, select " Run " then " Run Configurations... ".


Widgets SKD

" Run Configurations - Create, manage, and run configurations " dialog box is opened.
In the configurations list, choose " Mobile Widget Application " then " New_configuration ".
You can specify a name for this configuration, in the " Name " textfield.
By default, it will be named " New_configuration ".
Select a project on which the configuration will be applied by clicking on the " Browse... " button.

In the " Task " group, select " Compile and test ".

The " Emulator " group is enabled.
There are three configurations items:

Widgets SKD

" Supported language " or " Supported size " dialog boxes are opened after " Select language " or " Select size " button selected.


Widgets SKD

" Run Configurations - Create, manage, and run configurations " dialog box is completed.
Click on the " Apply " button to save your configuration.
Then click on the " Run " button to launch it.
The WRL sources are compiled for the current language and resolution and the emulator is launched.


Important:
If you are running a " Tiny Mobile Widget ", the " Project " group of the " Run Configurations " page will look like this:

Widgets SKD

If you have modified the " Widget Entry Point ", you must update this value for the project to compile.

Note:
In a " Tiny Mobile Widget Project ", the entry point can not be named " main.wrl ".
Whereas in a " Mobile Widget Project ", the entry point must always be named " main.wrl ".


" Toolbar " for running the Mobile Widget

Select a Widget Project in " Project Explorer ".

Widgets SKD

Click on the " Configuration for tests and export " button on the Toolbar (marked in blue).

Widgets SKD

" Widget configuration - Parameters for test with emulator and export " dialog box is opened.

The Widget Version can be modified in the " Version " group.

The " Test with Emulator " group is enabled.
There are three configurations items:

Widgets SKD

" Supported language " or " Supported size " dialog boxes are opened after " Select language " or " Select size " button selected.

Once the setup is done, click on the " Finish " button to save it.

Important:
If you are configuring a " Tiny Mobile Widget ", the " Compile " group is added in the " Widget Configuration " page will look like this:

Widgets SKD

If you have modified the " Widget Entry Point ", you must update this value for the project to compile.

Note:
In a " Tiny Mobile Widget Project ", the entry point can not be named " main.wrl ".
Whereas in a " Mobile Widget Project ", the entry point must always be named " main.wrl ".


Widgets SKD

This configuration will be used when:

or to launch the emulator.


" Shortcut " for running the Mobile Widget

For convenience, a launch shortcut is provided.

Widgets SKD

To access it, right click on a " Mobile Widget " or a " Tiny Mobile Project " or one of its elements.
Then for running, 2 possibilities :

or

This shortcut provides the following configuration:


There are three different ways to exporting the Mobile Widget:


" Run Configurations " for exporting Mobile Widget

Widgets SKD

In top menu bar, select " Run " then " Run Configurations... ".


Widgets SKD

" Run Configurations - Create, manage, and run configurations " dialog box is opened.
In the configurations list, choose " Mobile Widget Application " then " New_configuration ".
You can specify a name for this configuration, in the " Name " textfield.
By default, it will be named " New_configuration ".
Select a project on which the configuration will be applied by clicking on the " Browse... " button.

In the " Task " group, select " Export Widget ".

The " Package " group is enabled.
Select one or several packages to create.
There are seven " Packages " purposed:

Click on the " Apply " button to save your configuration.
Then click on the " Run " button to launch the export task(s).


" Toolbar " for exporting Mobile Widget

Select a Widget Project in " Project Explorer ".

Widgets SKD

Click on the " Configuration for tests and export " button on the Toolbar (marked in blue).

Widgets SKD

" Widget configuration - Parameters for test with emulator and export " dialog box is opened.
In the " Export " group, you can choose the packages to generate when the export task is launched.

Important:

Widgets SKD

The " Package for Ulight " option is only available for " Tiny Mobile Widgets ".

Click on the " Finish " button to save the configuration.

Widgets SDK Manual

Once the setup is done, click on the " Export Widget " button on the Toolbar (marked in blue) to launch the selected export tasks.


" Context Menu " for exporting Mobile Widget

Select a Widget Project in " Project Explorer ".

Widgets SDK Manual

To access to Context Menu, right click on a " Mobile Widget " or a " Tiny Mobile Project " or one of its elements.
Then select " Mobile Widgets SDK Tools " and select one of " Package ".
It allows launching export tasks one by one.

The " Package for Ulight " option is only available for " Tiny Mobile Widgets ".
The " Export widget " option launches the packages tasks selected in the " Toolbar configuration " screen.

Note: in case of a RIM AppWorld (BlackBerry) package, some properties need to be configured. See the part about Global preferences for more info.


Documentation in HTML can be generated from the comments present in the VRML code of the widget.

There are two different ways to generate documentation the Mobile Widget:


" Run Configurations " for generating documentation

Widgets SKD

In top menu bar, select " Run " then " Run Configurations... ".


Widgets SKD

" Run Configurations - Create, manage, and run configurations " dialog box is opened.
In the configurations list, choose " Mobile Widget Application " then " New_configuration ".
You can specify a name for this configuration, in the " Name " textfield.
By default, it will be named " New_configuration ".
Select a project on which the configuration will be applied by clicking on the " Browse... " button.

In the " Task " group, select " Generate Documentation ".
Click on the " Run " button.
The documentation is generated in the " doc " folder of the Mobile Widget project and opened in a web browser.


" Context Menu " for generating documentation

Select a Mobile Widget Project in " Project Explorer ".

Widgets SDK Manual

To access to Context Menu, right click on a " Mobile Widget " or a " Tiny Mobile Project " or one of its elements.
Then select " Mobile Widgets SDK Tools " and select " Generate documentation ".

The documentation is generated in the " doc " folder of the Mobile Widget project and opened in a web browser.


Add project nature

A project obtained from repository check-out which contains all the mandatory elements may not have the required " Mobile Widget " nature.
In this case, the options of the context menus, the " Run Configurations " and the Toolbar are not available for the project.
To convert such a project in a " Mobile Widget " or a " Tiny Mobile Widget " project, use the " Mobile Widgets SDK Tools ":

Widgets SDK Manual

To access to Context Menu, right click on another element not a " Mobile Widget " and not a " Tiny Mobile Project ".
Then select " Mobile Widgets SDK Tools ".
Then select your between " convert to Tiny Mobile Project (Generic) " or " convert to Mobile Widget Project ".

Once the project converted, the related actions become available and the needed symbolic links are created.
The project nature is indicated by the icon for " Mobile Widget Project " or for " Tiny Mobile Widget Project ".


Remove project nature

If you convert a project that should not have been, the nature can always be removed by using the context menu.

Widgets SDK Manual

To access to Context Menu, right click on a " Mobile Widget " or a " Tiny Mobile Project ".
Then select " Mobile Widgets SDK Tools ".
Then select your between " Remove Mobile Widget Nature ".

The project nature is indicated without an icon.

Widgets SDK Manual


The Micro Emulator configuration file is available here:

Add these two lines in your " Micro Emulator " configuration file (" config2.xml ") in " <system-properties> " paragraph: