Tag Archive - Eclipse

Installing Eclipse with the Palm WebOSdev SDK

Installing Eclipse and the Plug-Ins

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.

To install Eclipse

  1. Download Eclipse 3.4.2, also called Ganymede.
  2. Start Eclipse.
  3. 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.

To find and install updates

  1. On the Help menu, select Software Updates and open the Available Software tab.
  2. Click Add Site.
  3. In the Location field, type  https://cdn.downloads.palm.com/sdkdownloads/1.1/eclipse-plugin/eclipse-3.4/site.xml  and click OK.
  4. Open the site in the list, expand the Palm Mojo SDK category and check Palm Mojo SDK.
  5. Click Install and accept the license agreements.
  6. Restart Eclipse when prompted.

Aptana

To improve the development experience, Palm recommends installing the Aptana Studio plugins. Instructions for installing Aptana are available at www.aptana.com as well.

  1. On the Help menu, select Software Updates and open the Available Software tab.
  2. Click Add Site.
  3. In the Location field, type http://update.aptana.com/update/studio/3.4/ and click OK.
  4. Open the site in the list and check Aptana Studio Installer for Eclipse 3.4.
  5. Click Install and accept the license agreements.
  6. Restart Eclipse when prompted.

Using Eclipse with the Plug-Ins

This section describes how to run Eclipse and use the debug launch configuration.

Running Eclipse

  • Mac: In the Eclipse folder (inside the Applications folder), double-click Eclipse.
  • Windows: Find and run eclipse.exe (its location depends on where you installed Eclipse).
  • Linux: At the command line, type: eclipse

Selecting the webOS Perspective

  1. Select Window > Open Perspective… > Other…
  2. Select webOS from the Open Perspective dialog.
  3. Click OK.

Generating a webOS Application

From the New Project menu:

  1. Select File > New Mojo Application.
  2. On the next screen, type a name in the Project Name field.
  3. Enter your application info:
    • Title
    • Vendor
    • ID
    • Version
  4. Click Finish.

From the New App toolbar menu:

  1. In the Eclipse toolbar, click the Mojo Wizard icon and select New App from the drop down menu.
  2. On the New Project Wizard screen, type a name in the Project Name field.
  3. Enter your application info:
    • Title
    • Vendor
    • ID
    • Version
  4. Click Finish.

Adding a scene to your webOS Application

From the New Project Menu:

  1. Select File > New > Mojo Scene.
  2. On the New Mojo Scene Screen, make sure the correct project is selected.
  3. Enter a name for your scene and click Finish.

From the New Scene toolbar menu:

  1. In the eclipse toolbar, click the Mojo Wizard icon and select New Scene from the drop down menu.
  2. On the New Mojo Scene Screen, make sure the correct project is selected.
  3. Enter a name for your scene and click Finish.

Running a webOS Application

  1. Select Run > Run Configurations…
  2. Select Palm Application and click the New Configuration icon to create a new launch configuration.
  3. Change the name.
  4. Select your project from the drop-down list.
  5. Select the Target:
    • Palm Emulator if you are using the emulator.
    • Palm Device if you are using a device (make sure your device is in Developer Mode).
  6. Click Run to install and run the application.

A launch shortcut is also available: In the Projects view, select the project and choose Run > Run As > Mojo Application. If you previously created a launch configuration, that target will be used. Otherwise, a dialog will pop up so you can select a target.

Debugging a webOS Application

  1. Select Run > Debug Configurations…
  2. Select Palm Application and click the New Configuration icon to create a new launch configuration.
  3. Change the name.
  4. Select your project from the drop-down list.
  5. Select the Target:
    • Palm Emulator if you are using the emulator.
    • Palm Device if you are using a device.
    • Under “Debug Options”, choose debugging options as follows:
    • Inspectable: Makes the application’s DOM available to the Palm Inspector. Equivalent to the following command:
      palm-launch -i <appid>
    • Mojo debugging: Enables debug logging in the mojo framework. Equivalent to the following command:
      palm-launch -p "{mojoConfig:true, debuggingEnabled:true}" <appid>
  6. Click Debug to install and run the application.

A launch shortcut is also available: In the Projects view, select the project and choose Run > Debug As > Mojo Application. If you previously created a launch configuration, that target will be used. Otherwise, a dialog will pop up so you can select a target.

Stay Updated

When new Eclipse plugins are available (currently you are notified through email), you can install them through the Eclipse Update Manager.

  1. On the Help menu, select Software Updates and open the Installed Software tab.
  2. Select Palm Development Tools and click Update.
  3. Click Install and accept the license agreements.
  4. Restart Eclipse when prompted.

Enabling Developer Mode

To install and test applications on a webOS device, you’ll need to enable

Developer Mode on the device.

  1. In card view or in the Launcher application, type the following:
  2. upupdowndownleftrightleftrightbastart
    
     
    
  3. Tap the resulting Developer Mode Enabler icon to launch the application.
  4. In the application, move the Developer Mode slider to the On position.
  5. Tap Reset the Device. When reset is complete, Developer Mode is enabled.