public interface IDiagramContainerUI extends IDiagramContainer, IAdaptable
DiagramEditorInput
that points to the
diagram to display. This input is not technically an IEditorInput, as
diagrams may be displayed in non-editor parts.
As a temporary workaround for Bugzilla 407510 a class implementing
IDiagramContainerUI must additionally implement the methods 'public void
configureGraphicalViewer()' and 'public void initializeGraphicalViewer()'
that initialize the GEF editor used inside the container. This methods should
have been added to the interface, but that was no longer possible because the
bug was only detected in a late phase after API freeze. This will be fixed
with the 0.11.0 version of Graphiti.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIAGRAM_CONTEXT_ID
The ID of the context as it is registered with the
org.eclipse.ui.contexts extension point.
|
Modifier and Type | Method and Description |
---|---|
void |
commandStackChanged(java.util.EventObject event)
Notification that the command stack changed.
|
void |
configureGraphicalViewer()
Called to configure the
GraphicalViewer of this container, before
it receives its content. |
org.eclipse.gef.ui.actions.ActionRegistry |
getActionRegistry()
Returns the GEF action registry for the container.
|
DiagramBehavior |
getDiagramBehavior()
Returns the
DiagramBehavior instance associated with this
container. |
IDiagramEditorInput |
getDiagramEditorInput()
Returns the
IDiagramEditorInput instance used for this container. |
org.eclipse.gef.DefaultEditDomain |
getEditDomain()
Returns the GEF edit domain as needed for some of the feature
functionality in Graphiti; simply a public rewrite of the GEF editor
super method.
|
org.eclipse.gef.GraphicalViewer |
getGraphicalViewer()
Returns the GEF
GraphicalViewer as it is needed in some Graphiti
feature implementations. |
java.util.List |
getSelectionActions()
Returns the actions used for selection of the parent GEF editor, for an
editor based upon the GEF editor this simply returns the standard GEF
selection actions by delegating to the super editor class.
|
IWorkbenchPartSite |
getSite()
Returns the
IWorkbenchPartSite of the Eclipse
IWorkbenchPart that displays this container. |
IWorkbenchPart |
getWorkbenchPart()
Returns the instance of the Eclipse
IWorkbenchPart that displays
this container. |
void |
hookGraphicalViewer()
Hooks the
GraphicalViewer to be used inside the container. |
void |
initializeGraphicalViewer()
Called to initialize the
GraphicalViewer of this container with
its content. |
void |
setEditDomain(org.eclipse.gef.DefaultEditDomain editDomain)
Sets the GEF edit domain to the container.
|
void |
setGraphicalViewer(org.eclipse.gef.GraphicalViewer viewer)
Sets the
GraphicalViewer to be used inside the container. |
close, doSave, getDiagramTypeProvider, getSelectedPictogramElements, getTitle, getTitleToolTip, isDirty, refreshTitle, refreshTitleToolTip, selectPictogramElements, setPictogramElementForSelection, setPictogramElementsForSelection, updateDirtyState
getAdapter
static final java.lang.String DIAGRAM_CONTEXT_ID
org.eclipse.gef.DefaultEditDomain getEditDomain()
DefaultEditDomain
used in this editorGraphicalEditor.getEditDomain()
void setEditDomain(org.eclipse.gef.DefaultEditDomain editDomain)
DiagramBehavior
instance.editDomain
- The DefaultEditDomain
to setGraphicalEditor#setEditDomain()
org.eclipse.gef.GraphicalViewer getGraphicalViewer()
GraphicalViewer
as it is needed in some Graphiti
feature implementations. This is simply a public rewrite of the according
super method.GraphicalViewer
used within this editor instanceGraphicalEditor.getGraphicalViewer()
void configureGraphicalViewer()
GraphicalViewer
of this container, before
it receives its content. The default-implementation is for example doing
the following: configure the ZoomManager, registering Actions... Here
everything is done, which is independent of the
IConfigurationProviderInternal.void initializeGraphicalViewer()
GraphicalViewer
of this container with
its content. Here everything is done, which is dependent of the
IConfigurationProviderInternal.GraphicalEditorWithFlyoutPalette.initializeGraphicalViewer()
IWorkbenchPart getWorkbenchPart()
IWorkbenchPart
that displays
this container. E.g. for an editor this will be the editor itself.IWorkbenchPart
that is displaying the diagram.IWorkbenchPartSite getSite()
IWorkbenchPartSite
of the Eclipse
IWorkbenchPart
that displays this container. E.g. for an editor
this will be the editor site.IWorkbenchPart
that is displaying the
diagram.IDiagramEditorInput getDiagramEditorInput()
IDiagramEditorInput
instance used for this container.
Basically it is used as an Eclipse IEditorInput
object only in
case the container is an editor; for other types of containers the input
is simply used as a holder for a URI pointing to a diagram.org.eclipse.gef.ui.actions.ActionRegistry getActionRegistry()
ActionRegistry
java.util.List getSelectionActions()
List
containing the selection actionsGraphicalEditor.getSelectionActions()
void commandStackChanged(java.util.EventObject event)
event
- An event instance describing what happenedGraphicalEditor.commandStackChanged(EventObject event)
void setGraphicalViewer(org.eclipse.gef.GraphicalViewer viewer)
GraphicalViewer
to be used inside the container. The
viewer is created by the DiagramBehavior
instance and needs to be
set in the GEF container.viewer
- The viewer to use.GraphicalEditor.setGraphicalViewer(GraphicalViewer viewer)
void hookGraphicalViewer()
GraphicalViewer
to be used inside the container.viewer
- The viewer to use.GraphicalEditor#hookGraphicalViewer(GraphicalViewer viewer)
DiagramBehavior getDiagramBehavior()
DiagramBehavior
instance associated with this
container.getDiagramBehavior
in interface IDiagramContainer
DiagramBehavior
instance