Before you can run the sample, you must first import the sample into your workspace and launch the test runtime.
Follow these steps:
- To import the sample:
- Select File > Import.
- From the Import Wizard, select General and then select Existing Projects into Workspace. Click Next.
- Select the Archive file radio button.
- Enter the name of the sample jar file, richapp.jar, or browse to the com.ibm.rcp.tools.samplegallery plug-in directory and select the jar file from the archive directory.
- The dialog shows the projects present in the archive jar file. Select Finish to install the projects into your workspace.
- To launch the test runtime:
- Select Run > Run Configurations... from the main menu.
- Select Client Services and click New.
- Type a unique name for your configuration, such as Rich Application.
- Select the Plug-ins tab and verify that the com.ibm.rcp.samples.richapp plug-ins is selected.
- Select the Arguments tab and verify that –console is in the Program Arguments field.
- Click Apply and then Run.
- This sample makes several contributions to the client user interface and menu system. To view these capabilities:
Parent topic: Rich application
- After the workbench starts, select Sample Menu > Run Global Action to perform this action. The action results in a dialog box containing the message Global Action. Global actions are available even when no perspectives are open.
- Select Open > Samples > Sample Rich Application to open the application. The application demonstrates a perspective containing two views. Primary View is a non-closable, non-movable view. Secondary View can be closed or moved within the perspective. The sample application was contributed to the launcher list by implementing the com.ibm.rcp.ui.launcherSet extension point.
- The sidebar opens when an application is selected. The Sample Rich Application contributes the Shelf View to the sidebar. Select View > Sidebar to open, close, or shrink the sidebar. Select View > Sidebar Panels to hide or show the Shelf View on the sidebar.
- With the sample application opened, close the Secondary View. Then select Sample Menu > Open Secondary View to reopen the view. This demonstrates actions (Open Secondary View) that are specific to an application (perspective).
- Click Secondary View to highlight this view. Select Sample Menu > Run View Action to run a view specific action. This results in a dialog box containing the message View Action. This demonstrates an action that is specific to a view.
The sample application is not available in the Open menu.Cause:
The com.ibm.rcp.samples.richapp plug-in is not present or does not resolve in the client platform.Action:
Verify that the com.ibm.rcp.samples.richapp plug-in is contained in the runtime. If the plug-in is present, check the status of the plug-in. Go to the console view, and enter the b com.ibm.rcp.samples.richapp command. The second line of output indicates the plug-in status. If the status is not RESOLVED or ACTIVE, then there is a problem with the plug-in and its dependencies. Use the diag com.ibm.rcp.samples.richapp command to identify any unsatisfied dependencies. Resolve any missing dependencies and restart the platform.