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.
-
If your plug-in project does not have the com.sabre.edge.platform.optional.webkit dependency, add it.
-
Add a new view element to the org.eclipse.ui.views extension point.
-
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.
-
In the class field, choose com.sabre.edge.platform.optional.webkit.views.WebkitView.
-
(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.
-
Link the view that you created in a previous step to perspectiveExtension.
-
Set the values for other properties of the view. For a description, see Creating a Sample View.
-
Add the org.eclipse.ui.commands extension point. Add a new command and the commandParameter element:
The commandParameter
is the viewId
.
-
For defaultHandler, type com.sabre.edge.platform.core.common.handlers.OpenBrowserViewHandler.
-
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 .
-
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.