Creating Red App using Webkit Browser view
In existing Red App plug-in (created in the same way as e.g. browser plug-in) developer can add customized view with his own web application.
-
Add following plugins to required bundles in MANIFEST.MF file:
Require-Bundle:
-
org.eclipse.ui
-
org.eclipse.core.runtime
-
com.sabre.edge.platform.optional.webkit
-
-
Define custom view using extensions:
<extension point="com.sabre.edge.platform.core.ui.viewApp"> <viewApp browserURL="https://www.sabreredappcentre.sabre.com/" viewId="com.sabre.redapp.example.webkit.SimplifiedApi" /> </extension> <extension point="org.eclipse.ui.views"> <view allowMultiple="true" class="com.sabre.edge.platform.optional.webkit.views.WebkitView" icon="images/icon.png" id="com.sabre.redapp.example.webkit.SimplifiedApi" name="Simplified Webkit API View" restorable="true"> </view> </extension>
-
Add commands and handlers for opening created views:
<extension point="org.eclipse.ui.commands"> <command defaultHandler="com.sabre.edge.platform.core.common.handlers.OpenBrowserViewHandler" id="com.sabre.redapp.example.webkit.OpenBrowserView" name="Open Webkit View"> <commandParameter id="viewId" name="viewId" optional="true"> </commandParameter> <commandParameter id="url" name="url" optional="true"> </commandParameter> </command> </extension> <extension point="org.eclipse.ui.menus"> <menuContribution allPopups="false" locationURI="menu:com.sabre.edge.toolbar.launcher.other"> <command commandId="com.sabre.redapp.example.webkit.OpenBrowserView" icon="images/icon.png" label="Open Webkit Simplified API View" style="push"> <parameter name="viewId" value="com.sabre.redapp.example.webkit.SimplifiedApi"> </parameter> </command> </menuContribution> </extension>
images directory should be placed in main plug-in directory.
Note
|
See com.sabre.redapp.example.webkit sample for details. |