|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
public abstract class XMLAccessModifyAction
Base action for generic xml modification actions.
Supposed to be subclassed. Naming convention for actions:
ProccessSubject[Wizard]PlaceAction.
Field Summary | |
---|---|
protected DOMIntervalSet |
selection
Current selection on document. |
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 | |
---|---|
XMLAccessModifyAction(IWorkbenchPart part)
Constructor. |
|
XMLAccessModifyAction(IWorkbenchPart part,
int style)
Constructor. |
Method Summary | |
---|---|
protected boolean |
calculateEnabled()
When overriding, call to this method as first statement is needed. |
void |
dispose()
|
protected CaretManager |
getCaretManager()
Returns caret provider. |
protected IDManager |
getIdManager()
Getter. |
protected DocumentModifyHelper |
getModifyHelper()
Getter. |
protected DomPointer |
getPointer()
Returns pointer to place in DOM tree where is caret. |
protected DOMIntervalSet |
getSelection()
|
protected IDOMSelectionProvider |
getSelectionProvider()
Returns DOM selection provider. |
protected Shell |
getShell()
Returns shell where the action executes. |
protected XMLAccess |
getXMLAccess()
Returns instance of the document. |
protected void |
handleDocumentException(DocumentException e)
Handles the exception that occured when asking for node for invalid id in IDManager: prints an error message and logs it. |
protected void |
handleExportException(ExportException e)
Handles the exception that occured during the document modification: prints an error message and logs it. |
protected void |
logError(Throwable e)
Error logging method. |
protected void |
logError(Throwable e,
String msg)
Error logging method. |
protected void |
processSelection()
Refreshes the properties of this action, which depends on selection. |
void |
run()
Default implementation is run action in command. |
protected void |
runAsCommand()
If action run method should run whole in command(and undo/redo is getUndoManager().undo/redo), override this method instead of run. |
void |
setWorkbenchPart(IWorkbenchPart part)
|
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 |
Field Detail |
---|
protected DOMIntervalSet selection
Constructor Detail |
---|
public XMLAccessModifyAction(IWorkbenchPart part)
part
- The workbench part associated with this action, not
nullpublic XMLAccessModifyAction(IWorkbenchPart part, int style)
part
- The workbench part associated with this actionstyle
- the style for this actionMethod Detail |
---|
protected boolean calculateEnabled()
calculateEnabled
in class org.eclipse.gef.ui.actions.WorkbenchPartAction
protected void processSelection()
public void setWorkbenchPart(IWorkbenchPart part)
setWorkbenchPart
in class org.eclipse.gef.ui.actions.WorkbenchPartAction
protected void runAsCommand()
public void run()
run
in interface IAction
run
in class Action
protected final Shell getShell()
protected CaretManager getCaretManager()
protected DomPointer getPointer()
protected IDOMSelectionProvider getSelectionProvider()
protected DOMIntervalSet getSelection()
protected final DocumentModifyHelper getModifyHelper()
protected XMLAccess getXMLAccess()
null
.protected IDManager getIdManager()
protected final void logError(Throwable e, String msg)
e
- exception to logmsg
- description of the errorprotected final void logError(Throwable e)
e
- exception to logprotected final void handleExportException(ExportException e)
ex
- exception to handle.protected final void handleDocumentException(DocumentException e)
ex
- exception to handle.public void dispose()
dispose
in interface org.eclipse.gef.Disposable
dispose
in class org.eclipse.gef.ui.actions.WorkbenchPartAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |