Eclipse™ Plug-in
Palm provides plug-ins to the Eclipse IDE to facilitate Palm application development.
This document contains the following sections:
Installing Eclipse and the Palm Plug-In
This section describes how to install and update Eclipse.
Note:
If you are using an earlier version of Eclipse, you must upgrade to Eclipse 3.4 to get the new plug-ins for Palm® webOS™ development.
Install Eclipse
- Download Eclipse 3.4.2, also called Ganymede, by selecting your system:
- Start Eclipse
- When prompted for a workspace location, accept the default ( /home/YOUR_USER_NAME/workspace )
Note:
The workspace location must be an absolute path with no spaces.
Find and install updates
- Select Help > Software Updates, and then click the Available Software tab
- Click Add Site
- In the Location field, type http://cdn.downloads.palm.com/sdkdownloads/eclipse-update-site/site.xml, and then click OK
- Open the new site in the list, expand Palm Mojo SDK, and the click the Palm Mojo SDK check box
- Click Install and accept the license agreements
- Restart Eclipse when prompted
Installing the Aptana Plug-In
To improve the development experience, Palm recommends installing the Aptana Studio plug-ins. Instructions for installing Aptana are also available at www.aptana.com
Find and install updates
- Select Help > Software Updates, and then click the Available Software tab
- Click Add Site
- In the Location field, type http://update.aptana.com/update/studio/3.4/, and then click OK
- Open the new site in the list, and click the Aptana Studio Installer for Eclipse 3.4 Update Site check box
- Click Install and accept the license agreements
- Restart Eclipse when prompted
Using Eclipse with the Plug-Ins
This section describes how to run Eclipse and use the debug launch configuration.
Starting Eclipse
Follow these instructions to start Eclipse:
- Linux: At the command prompt, type eclipse
- Mac: In the Eclipse folder (inside the Applications folder), double-click Eclipse
- Windows: Find and open eclipse.exe (its location depends on where you installed Eclipse)
Selecting the webOS Perspective
Eclipse has several perspectives, or views, from which to choose. You want to work in the webOS perspective
Select the perspective
- Select Window > Open Perspective > Other
- Select webOS, and then click OK
Generating a webOS Application
This section includes the following procedures:
Note:
You can also use the New Mojo application icon in the Workbench toolbar to create an application or scene.
Create a new webOS application
- Select File > New > Mojo Application
- In the Project Name field, type a name and the following:
- Click Finish
Add a scene to the application
- Select File > New > Mojo Scene
- Select the project
- In the Name field, type the name of the scene, and then click Finish
Start the application
- Select Run > Run Configurations
- Select Mojo Application, and then click the New launch configuration icon
- In the Name field, type the name
- Click the Project arrow to select the project
- Click the Target arrow and select one of the following:
- Palm Emulator, if you are using the emulator
- Palm Device, if you are using a device (ensure the device is in Developer Mode )
- Click Run
Note:
A launch shortcut is also available. Select the project and Run > Run As > Mojo Application. If you previously created a launch configuration, that target is used. Otherwise, a dialog box pops up so you can select a target.
Debug an application
- Select Run > Debug Configurations
- Select Mojo Application, and then click the New launch configuration icon
- In the Name field, type the name
- Click the Project arrow to select the project
- Click the Target arrow and select one of the following:
- Palm Emulator, if you are using the emulator
- Palm Device, if you are using a device
- In the Debug Options area, select one of the following:
- Inspectable, which makes the application's DOM available to the Palm Inspector. This is equivalent to the following command:
palm-launch -i <appid> - Mojo debugging, which enables debug logging in the Mojo framework. This is equivalent to the following command:
palm-launch -p "{'mojoConfig' : true, 'debuggingEnabled' :true}" <appid>
- Click Debug
Note:
A launch shortcut is also available. Select the project and Run > Debug As > Mojo Application. If you previously created a launch configuration, that target is used. Otherwise, a dialog box pops up so you can select a target.
Stay Updated
When new Eclipse plug-ins are available (currently you are notified through email), you can install them through the Eclipse Update Manager as follows:
- Select Help > Software Updates, and then click the Installed Software tab
- Select Palm Mojo SDK and click Update
- Click Install and accept the license agreements
- Restart Eclipse when prompted
Enabling Developer Mode
To install and test applications on a webOS device, you need to enable Developer mode on the device.
Note:
Locking the phone with a PIN does not protect data on the device in Developer mode. When Developer mode is enabled, it is possible to use tools such as novaterm to access the device through the USB even if the phone is locked.
Enable Developer mode
- In Card view or in the Launcher application, type the following:
upupdowndownleftrightleftrightbastart
- Tap the resulting Developer Mode Enabler icon.
- In the application, move the Developer Mode slider to the On position.
- Tap Reset the Device .
When reset is complete, Developer mode is enabled.