Breadcrumb
- Sabre Red 360 Software Development Kit Help
- Desktop Red Apps
- Workbench or UI Elements
- Views (Assistant Tools Panel)
- Dependencies, Extension Points, and Classes for Views
Dependencies, Extension Points, and Classes for Views
Whether you are customizing a view or creating the sample view that the procedure in this book builds, both Eclipse and Sabre Red 360 have defined some dependencies, extension points, and classes that are required to create a view. These requirements follow.
Minimum Required Dependencies:
-
org.eclipse.core.runtime
-
org.eclipse.ui
-
com.sabre.edge.platform.core.ui . This is a Sabre Red 360 dependency.
Extension Points:
-
org.eclipse.ui.views
This Eclipse extension point enables plug-ins to add views to the Sabre Red 360. It is required to add a view to this extension point.
-
org.eclipse.ui.perspectiveExtensions
It is required to add the perspectiveExtension
element to this extension point, and to set the value of the targetId
property to com.sabre.edge.app.ui.perspective.
It is required to add a view to com.sabre.edge.app.ui.perspective , and to set the value of the relative
property to org.eclipse.ui.editorss.
Note
|
The relative property value ends with two of the letter "s".
|
-
org.eclipse.ui.commands
If you are using the Sabre Red 360 handler named com.sabre.edge.platform.core.ui.handlers.OpenViewHandler to open views, it is required to add a commandParameter
element to this extension point, and to set the value of the id
property to viewId
. This ensures compatibility with the Sabre Red 360 handler.
-
org.eclipse.ui.handlers
You have the following options for org.eclipse.ui.handlers:
-
Use the Sabre Red 360 handler com.sabre.edge.platform.core.ui.handlers.OpenViewHandler.
-
Provide your own handler to extend the org.eclipse.core.commands.AbstractHandler class.
It is not necessary to write code to handle the opening of a new view when you use the Sabre Red 360 OpenViewHandler.
Classes:
-
org.eclipse.ui.part.ViewPart
This class implements the view’s content. Your class must extend ViewPart.
If you are creating two views, each with different content, you must create two implementations of this class.
-
createPartControl(Composite parent) method
This method is responsible for the user interface of the view. The Composite
argument is the main parent widget.
The user interface of the view is the Red App assistant tool that runs within the view window.
-
setFocus() method
When the view receives focus, setFocus() establishes the widget that receives focus first.
-
A handler class is required for org.eclipse.ui.handlers . You have the following options:
-
Use the Sabre Red 360 handler class com.sabre.edge.platform.core.ui.handlers.OpenViewHandler. You do not need to write code to handle the opening of a view when you use the Sabre Red 360 class.
Provide your own handler class. Extend the handler class org.eclipse.core.commands.AbstractHandler.
-