public class DiagramInputInterpreter
extends EmfInputInterpreter
Modifier and Type | Field and Description |
---|---|
static ViewModeDescriptor |
DIAGRAM_DESC
MSL diagram view mode descriptor
|
static ViewModeDescriptor |
PROPERTY_DESC
MSL property view mode descriptor
|
static ViewModeDescriptor |
STRUCTURE_DESC
MSL structure view mode descriptor
|
Constructor and Description |
---|
DiagramInputInterpreter(IContentViewerPane contentViewerPane)
Constructs a new DiagramInputInterpreter
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canBrowseCustomContext(ViewModeDescriptor sourceViewMode,
ViewModeDescriptor targetViewMode,
org.eclipse.jface.viewers.ISelection selection)
Allows the interpreter to decide if in browse mode the selections from
the specified source view mode can be set as as the input to the
specified target view mode.
|
protected boolean |
canSupportOverlay(org.eclipse.gmf.runtime.notation.Diagram diagram)
Determines whether we can support the overlay feature for the given
diagram.
|
protected java.lang.Object |
executeMRunnable(MRunnable runnable)
Use the given MRunnable to execute operation in the
DiagramInputInterpreter.
|
protected java.util.List |
getAffectedDiagrams(IContentViewerInput input)
Returns the affected diagrams associated with the delta
|
protected java.util.List |
getCustomBrowseViewModes(IContentViewerInput input,
java.util.List currentBrowseViewModes)
Returns the list of custom browse view modes for the specified input.
|
protected java.util.List |
getCustomCurrentViewModes(IContentViewerInput input,
java.util.List currentDefaultViewModes)
Returns the custom current view modes associated with this digram input
interpreter.
|
protected boolean |
isDiagramChange(IContentViewerInput input)
Checks if the delta is associated with a diagram change.
|
protected boolean |
isDiagramElementsChange(IContentViewerInput input)
Checks if the delta is associated with a diagram element change.
|
protected IContentDescriptor |
revealCustomContent(IContentViewerInput input,
IViewerData viewerData)
Reveals the custom content for the specified input and viewer
|
protected boolean |
setCustomBrowseContext(org.eclipse.jface.viewers.ISelection selection,
IViewerData viewerData)
Sets the custom browse context associated with the current selection
within the specified content viewer.
|
protected boolean |
setCustomContext(IContentViewerInput input,
IViewerData viewerData,
boolean force)
Sets the custom context for the specified input and viewer
|
protected boolean |
setInitialCustomBrowseContext(IContentViewerInput input,
IViewerData viewerData)
Sets the intial custom browse context associated with the current input
within the specified content viewer.
|
protected void |
setShowInitialDiagramInBrowseMode(boolean enable)
Determines weather to display diagram content in diagram viewer when
users move in browse mode.
|
protected void |
showInitialDiagramInBrowseMode(IContentViewerInput input,
IViewerData viewerData)
Shows diagram content in diagram viewer when users move in browse mode
|
public static final ViewModeDescriptor STRUCTURE_DESC
public static final ViewModeDescriptor PROPERTY_DESC
public static final ViewModeDescriptor DIAGRAM_DESC
public DiagramInputInterpreter(IContentViewerPane contentViewerPane)
contentViewerPane
- Given contentViewPane used to construct the
DiagramInputInterpreterprotected boolean canSupportOverlay(org.eclipse.gmf.runtime.notation.Diagram diagram)
diagram
- The diagram objectprotected final java.util.List getAffectedDiagrams(IContentViewerInput input)
input
- the content viewer inputprotected final boolean isDiagramElementsChange(IContentViewerInput input)
input
- the content viewer inputprotected final boolean isDiagramChange(IContentViewerInput input)
input
- the content viewer inputprotected java.util.List getCustomCurrentViewModes(IContentViewerInput input, java.util.List currentDefaultViewModes)
input
- currentDefaultViewModes
- com.ibm.xtools.comparemerge.emf.viewers.EmfInputInterpreter#getCustomCurrentViewModes(com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput,
java.util.List)
protected IContentDescriptor revealCustomContent(IContentViewerInput input, IViewerData viewerData)
input
- the inputviewerData
- the viewer datacom.ibm.xtools.comparemerge.emf.viewers.EmfInputInterpreter#revealCustomContent(com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput,
com.ibm.xtools.comparemerge.ui.utils.IViewerData)
protected boolean setCustomContext(IContentViewerInput input, IViewerData viewerData, boolean force)
input
- the inputviewerData
- the viewer dataforce
- flag to indicate whether the input is forcedtrue
if successful, false
otherwisecom.ibm.xtools.comparemerge.emf.viewers.EmfInputInterpreter#setCustomContext(com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput,
com.ibm.xtools.comparemerge.ui.utils.IViewerData, boolean)
protected boolean canBrowseCustomContext(ViewModeDescriptor sourceViewMode, ViewModeDescriptor targetViewMode, org.eclipse.jface.viewers.ISelection selection)
sourceViewMode
- the source view mode from where the input is usedtargetViewMode
- the target view mode where the input from the source is setselection
- the source selectioncom.ibm.xtools.comparemerge.emf.viewers.EmfInputInterpreter#canBrowseCustomContext(com.ibm.xtools.comparemerge.ui.utils.ViewModeDescriptor,
com.ibm.xtools.comparemerge.ui.utils.ViewModeDescriptor,
org.eclipse.jface.viewers.ISelection)
protected java.util.List getCustomBrowseViewModes(IContentViewerInput input, java.util.List currentBrowseViewModes)
input
- the input associatedcurrentBrowseViewModes
- the EMF browse modesViewModeDescriptor
com.ibm.xtools.comparemerge.emf.viewers.EmfInputInterpreter#getCustomBrowseViewModes(com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput,
java.util.List)
protected boolean setCustomBrowseContext(org.eclipse.jface.viewers.ISelection selection, IViewerData viewerData)
selection
- the selection from the source viewerviewerData
- the target viewer datacom.ibm.xtools.comparemerge.emf.viewers.EmfInputInterpreter#setCustomBrowseContext(org.eclipse.jface.viewers.ISelection,
com.ibm.xtools.comparemerge.ui.utils.IViewerData)
protected boolean setInitialCustomBrowseContext(IContentViewerInput input, IViewerData viewerData)
input
- the input associated, which represents the current selection
in the StructureViewerviewerData
- the associated viewer datacom.ibm.xtools.comparemerge.emf.viewers.EmfInputInterpreter#setInitialCustomBrowseContext(com.ibm.xtools.comparemerge.ui.controller.IContentViewerInput,
com.ibm.xtools.comparemerge.ui.utils.IViewerData)
protected void setShowInitialDiagramInBrowseMode(boolean enable)
enable
- true if show diagram content. otherwise, falseprotected void showInitialDiagramInBrowseMode(IContentViewerInput input, IViewerData viewerData)
input
- ContentViewerInput to diagram viewer.viewerData
- ViewerData to diagram viewer.protected java.lang.Object executeMRunnable(MRunnable runnable)
runnable
- Given MRunnable instance