|
||||||||||
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:
ProccessActor[Wizard]PlaceAction.
Field Summary | |
---|---|
protected IAdaptable |
adaptableProvider
Adaptable provider |
protected sk.baka.ikslibs.interval.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)
Creates a XMLAccessModifyAction and associates it with the
given editor. |
|
XMLAccessModifyAction(IWorkbenchPart part,
int style)
Creates a XMLAccessModifyAction and associates it with the
given editor. |
Method Summary | |
---|---|
protected boolean |
calculateEnabled()
|
protected void |
clear()
Clears the selection. |
protected IAdaptable |
getAdaptableProvider()
|
Object |
getAdapter(Class adapter)
Method call is delagated to AdaptableProvider if is not null, if is null method is delegated to WorkbenchPart. |
protected sk.baka.ikslibs.ids.IDManager |
getIdManager()
Returns IdManager. |
protected DocumentModifyHelper |
getModifyHelper()
Returns the controller instance. |
protected sk.baka.ikslibs.interval.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 ex)
Handles the exception that occured when asking for node for invalid id in IDManager: prints an error message and logs it. |
protected void |
handleDOMException(DOMException ex)
TODO |
protected void |
handleExportException(sk.baka.xml.gene.ExportException ex)
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()
Makes xmlSelection valid to current selection. |
protected void |
refresh()
|
void |
setAdaptableProvider(IAdaptable a)
Sets adaptable provider. |
void |
setWorkbenchPart(IWorkbenchPart part)
Sets new workbench part. |
void |
setXMLAccess(XMLAccess access)
Setter for xml access. |
void |
update()
|
Methods inherited from class org.eclipse.gef.ui.actions.WorkbenchPartAction |
---|
dispose, execute, getCommandStack, getWorkbenchPart, init, isEnabled, setLazyEnablementCalculation |
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, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, run, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText |
Field Detail |
---|
protected sk.baka.ikslibs.interval.DOMIntervalSet selection
protected IAdaptable adaptableProvider
Constructor Detail |
---|
public XMLAccessModifyAction(IWorkbenchPart part)
XMLAccessModifyAction
and associates it with the
given editor.
part
- The workbench part associated with this actionpublic XMLAccessModifyAction(IWorkbenchPart part, int style)
XMLAccessModifyAction
and associates it with the
given editor.
part
- The workbench part associated with this actionstyle
- the style for this actionMethod Detail |
---|
protected IDOMSelectionProvider getSelectionProvider()
protected boolean calculateEnabled()
calculateEnabled
in class org.eclipse.gef.ui.actions.WorkbenchPartAction
protected void clear()
protected sk.baka.ikslibs.interval.DOMIntervalSet getSelection()
protected final DocumentModifyHelper getModifyHelper()
protected XMLAccess getXMLAccess()
null
.public Object getAdapter(Class adapter)
getAdapter
in interface IAdaptable
IAdaptable.getAdapter(java.lang.Class)
public void setAdaptableProvider(IAdaptable a)
a
- provider to setprotected sk.baka.ikslibs.ids.IDManager getIdManager()
protected void processSelection()
protected void refresh()
refresh
in class org.eclipse.gef.ui.actions.WorkbenchPartAction
public void setWorkbenchPart(IWorkbenchPart part)
IMultiViewAction
setWorkbenchPart
in interface IMultiViewAction
setWorkbenchPart
in class org.eclipse.gef.ui.actions.WorkbenchPartAction
part
- active workbench partpublic void setXMLAccess(XMLAccess access)
access
- XMLAccess to setprotected 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(sk.baka.xml.gene.ExportException ex)
ex
- exception to handle.protected final void handleDocumentException(DocumentException ex)
ex
- exception to handle.protected final void handleDOMException(DOMException ex)
ex
- exception to handle.protected final Shell getShell()
public void update()
update
in interface org.eclipse.gef.ui.actions.UpdateAction
update
in class org.eclipse.gef.ui.actions.WorkbenchPartAction
protected IAdaptable getAdaptableProvider()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |