4 package eu
.etaxonomy
.taxeditor
.editor
.key
.polytomous
.operation
;
6 import org
.eclipse
.core
.commands
.ExecutionException
;
7 import org
.eclipse
.core
.commands
.operations
.IUndoContext
;
8 import org
.eclipse
.core
.runtime
.IAdaptable
;
9 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
10 import org
.eclipse
.core
.runtime
.IStatus
;
12 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
13 import eu
.etaxonomy
.taxeditor
.operation
.AbstractPostOperation
;
14 import eu
.etaxonomy
.taxeditor
.operation
.IPostOperationEnabled
;
20 public class DeleteNodeOperation
extends AbstractPostOperation
{
22 private final PolytomousKeyNode parent
;
23 private final PolytomousKeyNode node
;
25 public DeleteNodeOperation(String label
, IUndoContext undoContext
,
26 PolytomousKeyNode node
, IPostOperationEnabled postOperationEnabled
) {
27 super(label
, undoContext
, postOperationEnabled
);
29 this.parent
= node
.getParent();
36 * org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse
37 * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
40 public IStatus
execute(IProgressMonitor monitor
, IAdaptable info
)
41 throws ExecutionException
{
43 parent
.removeChild(node
);
45 return postExecute(null);
52 * org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse
53 * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
56 public IStatus
redo(IProgressMonitor monitor
, IAdaptable info
)
57 throws ExecutionException
{
58 return execute(monitor
, info
);
65 * org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse
66 * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
69 public IStatus
undo(IProgressMonitor monitor
, IAdaptable info
)
70 throws ExecutionException
{
71 // TODO Auto-generated method stub