|
EGF Engine Release 0.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAction
org.eclipse.egf.core.ui.workbench.action.navigator.AbstractNavigatorAction
org.eclipse.egf.core.ui.workbench.action.navigator.AbstractModelElementAction
org.eclipse.egf.core.ui.workbench.action.explorer.delete.DeleteModelElementAction
public abstract class DeleteModelElementAction
Base class to implement an action that deletes a model element object.
Constructor Summary | |
---|---|
protected |
DeleteModelElementAction(Shell shell_p,
ISelectionProvider selectionProvider_p,
boolean readOnlyMode_p)
Constructor. |
Method Summary | |
---|---|
protected boolean |
closeEditor(NamedModelElementWithId modelElement_p)
Close the editor related to given model element if any. |
protected boolean |
closeFileEditor(IFile modelElementFile_p,
String editorId_p)
Close the editor for given model element file (if an editor is open). |
protected void |
doDeleteModelElement()
Performs the model element delete and call the closeEditor method. |
protected abstract String[] |
getConfirmDeleteMessage()
Get the message used when displaying confirm delete dialog to the end-user. |
protected Wizard |
getWizardFor(NamedModelElementWithId modelElement_p)
Get the wizard that handles with given model element. |
void |
run()
|
void |
setUserConfirmationRequested(boolean userConfirmation_p)
Set whether or not a user confirmation is requested when running. |
Methods inherited from class org.eclipse.egf.core.ui.workbench.action.navigator.AbstractModelElementAction |
---|
computeImageDescriptorForModelElement, executeCommand, getEditingDomain, getModelElement, isReadOnly, openWizardDialog, setSelectedElement |
Methods inherited from class org.eclipse.egf.core.ui.workbench.action.navigator.AbstractNavigatorAction |
---|
getModelElementClass, getSelection, getSelectionProvider, getSharedImages, getShell, isSelectionCompatible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DeleteModelElementAction(Shell shell_p, ISelectionProvider selectionProvider_p, boolean readOnlyMode_p)
shell_p
- selectionProvider_p
- readOnlyMode_p
- Method Detail |
---|
public void setUserConfirmationRequested(boolean userConfirmation_p)
userConfirmation_p
- public void run()
org.eclipse.jface.action.Action#run()
protected void doDeleteModelElement()
protected abstract String[] getConfirmDeleteMessage()
protected Wizard getWizardFor(NamedModelElementWithId modelElement_p)
AbstractModelElementAction
getWizardFor
in class AbstractModelElementAction
modelElement_p
- the selected element that triggers this action.
Wizard
instance.AbstractModelElementAction.getWizardFor(org.eclipse.egf.model.NamedModelElementWithId)
protected boolean closeEditor(NamedModelElementWithId modelElement_p)
modelElement_p
-
true
means the editor is correctly closed and given model element can be safely deleted.true
.protected boolean closeFileEditor(IFile modelElementFile_p, String editorId_p)
modelElementFile_p
- a file that an editor is open for.editorId_p
- the id of the editor responsible to open given model element.
|
EGF Engine Release 0.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) Thales Corporate Services S.A.S, 2009.
This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.