Skip Navigation

Integrating a Web App Using the Default View

This procedure shows how to integrate a web app into a browser using default view classes.

Complete this procedure to configure a browser in a view with your target website.

  1. If your plug-in project does not have the com.sabre.edge.platform.optional.webkit dependency, add it.

  2. Add a new view element to the org.eclipse.ui.views extension point.

  3. Type values for the following view properties. id, name, and the path of an icon.

        For information about these properties, see the view element in Creating a Sample View. All view properties of the perspectiveExtension element apply.

  1. In the class field, choose com.sabre.edge.platform.optional.webkit.views.WebkitView.

image78

 

  1. (Optional) Add the org.eclipse.ui.perspectiveExtensions extension point. Add a new perspectiveExtension element. If you do not set up the perspectiveExtension for your view it will use default values instead.

  2. Link the view that you created in a previous step to perspectiveExtension.

  3. Set the values for other properties of the view. For a description, see Creating a Sample View.

image79

 

  1. Add the org.eclipse.ui.commands extension point. Add a new command and the commandParameter element:

The commandParameter is the viewId.

  1. For defaultHandler, type com.sabre.edge.platform.core.common.handlers.OpenBrowserViewHandler.

image81

 

  1. Add the org.eclipse.ui.menus extension point, and then add a new menu. Link menu to the command that you created in a previous step.

        Add values for the `viewId`parameter.

        This is the ID of the view that you typed in a previous step. In the example, the ID is com.sabre.redapp.example.webkit.BasicCommunication .

  1. Add the com.sabre.edge.platform.core.ui.viewApp extension point. Provide values for the following parameters:

        viewId This is the ID of the view that you typed in a previous step.

        url This is the URL of the website to display, such as http://www.sabre.com. The URL is passed through com.sabre.edge.platform.core.ui.viewApp .

The com.sabre.redapp.example.webkit Red App sample plug-in has an example of a basic communications browser in a webkit view.