public class DiagramStatus
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DiagramStatus.DesignView
The DesignView must be treated as a singleton service class.
|
Constructor and Description |
---|
DiagramStatus()
Instantiates a new diagram status.
|
DiagramStatus(org.eclipse.papyrus.infra.core.sasheditor.editor.IPage initialDiagram)
Creates the DiagramStatus service given the initial
IPage that corresponds to a Papyrus diagram. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getActiveView()
Returns the name of the active view.
|
DiagramStatus.DesignView |
getCurrentView()
Gets the current view.
|
boolean |
isSuperuser()
Checks if the DiagramStatus service is in superuser mode.
|
boolean |
isUserAction()
Checks if the action is done by the user or not.
|
boolean |
requestView(java.lang.String view,
boolean activate)
Request the activation/deactivation of a view given its name.
|
void |
setActualView(org.eclipse.papyrus.infra.core.sasheditor.editor.IPage currentDiagram)
Set the actual view given a diagram represented by an
IPage . |
void |
setActualView(org.eclipse.jface.viewers.TreeSelection currentTreeViewSelection)
Sets the actual view given the tree selection.
|
void |
setSuperuser(boolean b)
Sets the superuser mode.
|
void |
setUserAction(boolean b)
Set if the action is done by the user or is done by something else.
|
public DiagramStatus()
public DiagramStatus(org.eclipse.papyrus.infra.core.sasheditor.editor.IPage initialDiagram)
IPage
that corresponds to a Papyrus diagram.initialDiagram
- the initial IPage that corresponds to a Papyrus diagrampublic DiagramStatus.DesignView getCurrentView()
public java.lang.String getActiveView()
public boolean requestView(java.lang.String view, boolean activate)
view
- the name of the viewactivate
- true to request the activation, false to request the deactivationpublic void setActualView(org.eclipse.papyrus.infra.core.sasheditor.editor.IPage currentDiagram)
IPage
.currentDiagram
- the diagrampublic void setActualView(org.eclipse.jface.viewers.TreeSelection currentTreeViewSelection)
currentTreeViewSelection
- the tree selectionpublic void setUserAction(boolean b)
b
- true to set the action to true.public boolean isUserAction()
public boolean isSuperuser()
public void setSuperuser(boolean b)
b
- true to set the superuser mode, false otherwise