|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.gef.ui.actions.WorkbenchPartAction
sk.uniba.euromath.editor.xmlEditor.actions.XMLAccessModifyAction
sk.uniba.euromath.editor.xmlEditor.actions.NodeManipulateAction
public abstract class NodeManipulateAction
Common action for manipulating single node gained from:
NodeManipulateAction#SINGLE - selection must contain one node
only (otherwise action is disabled), so which is taken for manipulationNodeManipulateAction#FIRST - as node for manipualtion is taken
first node in selectionNodeManipulateAction#LAST - as node for manipualtion is taken
last node in selection
| Nested Class Summary | |
|---|---|
static class |
NodeManipulateAction.NodeAcquireType
Ways of how node for manipulation is acquired. |
| Field Summary |
|---|
| Fields inherited from class sk.uniba.euromath.editor.xmlEditor.actions.XMLAccessModifyAction |
|---|
selection |
| Fields inherited from interface org.eclipse.jface.action.IAction |
|---|
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT |
| Constructor Summary | |
|---|---|
NodeManipulateAction(IWorkbenchPart part)
Constructor. |
|
NodeManipulateAction(IWorkbenchPart part,
NodeManipulateAction.NodeAcquireType type,
boolean wholeNodesOnly)
Constructor. |
|
NodeManipulateAction(Node node,
IWorkbenchPart part)
Constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
calculateEnabled()
Is enabled if and only if node is not null (includes also case of wholeNodesOnly condition violation). |
Node |
getNode()
Returns node to manipulate with, which can be node from constructor or node processed from selection. |
NodeManipulateAction.NodeAcquireType |
getType()
Getter for type how node for manipulation is gained. |
protected boolean |
isStatic()
True, if node to manipulate was gained from contructor - was statically gained. |
protected void |
processSelection()
Processes selection, if should manipulate with node from selection. |
void |
setType(NodeManipulateAction.NodeAcquireType type)
Setter for type how node for manipulation is gained. |
| Methods inherited from class sk.uniba.euromath.editor.xmlEditor.actions.XMLAccessModifyAction |
|---|
dispose, getCaretManager, getIdManager, getModifyHelper, getPointer, getSelection, getSelectionProvider, getShell, getXMLAccess, handleDocumentException, handleExportException, logError, logError, run, runAsCommand, setWorkbenchPart |
| Methods inherited from class org.eclipse.gef.ui.actions.WorkbenchPartAction |
|---|
execute, getCommandStack, getWorkbenchPart, init, isEnabled, refresh, setLazyEnablementCalculation, update |
| Methods inherited from class org.eclipse.jface.action.AbstractAction |
|---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener |
| Methods inherited from class org.eclipse.core.commands.common.EventManager |
|---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.action.IAction |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public NodeManipulateAction(IWorkbenchPart part)
part - associated workbench part
public NodeManipulateAction(IWorkbenchPart part,
NodeManipulateAction.NodeAcquireType type,
boolean wholeNodesOnly)
part - associated workbench parttype - one of NodeManipulateAction.NodeAcquireType.First,
NodeManipulateAction.NodeAcquireType.Last,
NodeManipulateAction.NodeAcquireType.SinglewholeNodesOnly - !!! NOT IMPLEMENTED YET TODO STUDVA If to work and be
enabled only when selection contains nodes, which are
wholly selected
public NodeManipulateAction(Node node,
IWorkbenchPart part)
node - node to manipulate, must not be nullpart - associated workbench part| Method Detail |
|---|
protected boolean calculateEnabled()
calculateEnabled in class XMLAccessModifyActionpublic Node getNode()
protected void processSelection()
processSelection in class XMLAccessModifyActionprotected boolean isStatic()
public NodeManipulateAction.NodeAcquireType getType()
public void setType(NodeManipulateAction.NodeAcquireType type)
NodeManipulateAction.NodeAcquireType.First, NodeManipulateAction.NodeAcquireType.Last,
NodeManipulateAction.NodeAcquireType.Single. NodeManipulateAction.NodeAcquireType.Static is
not allowed, use instead contructor.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||