automated build configuration is on its way
[taxeditor.git] / taxeditor-editor / src / main / java / eu / etaxonomy / taxeditor / editor / key / polytomous / operation / DeleteNodeOperation.java
1 /**
2 *
3 */
4 package eu.etaxonomy.taxeditor.editor.key.polytomous.operation;
5
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;
11
12 import eu.etaxonomy.cdm.model.description.PolytomousKey;
13 import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
14 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
15 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
16
17 /**
18 * @author n.hoffmann
19 *
20 */
21 public class DeleteNodeOperation extends AbstractPostOperation {
22
23 private PolytomousKeyNode node;
24 private PolytomousKey key;
25
26 public DeleteNodeOperation(String label,
27 IUndoContext undoContext, PolytomousKeyNode node, IPostOperationEnabled postOperationEnabled) {
28 super(label, undoContext, postOperationEnabled);
29 this.node = node;
30 }
31
32 /* (non-Javadoc)
33 * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
34 */
35 @Override
36 public IStatus execute(IProgressMonitor monitor, IAdaptable info)
37 throws ExecutionException {
38
39 key = node.getKey();
40
41
42 return postExecute(null);
43 }
44
45 /* (non-Javadoc)
46 * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
47 */
48 @Override
49 public IStatus redo(IProgressMonitor monitor, IAdaptable info)
50 throws ExecutionException {
51 // TODO Auto-generated method stub
52 return null;
53 }
54
55 /* (non-Javadoc)
56 * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
57 */
58 @Override
59 public IStatus undo(IProgressMonitor monitor, IAdaptable info)
60 throws ExecutionException {
61 // TODO Auto-generated method stub
62 return null;
63 }
64
65 }