1 package eu
.etaxonomy
.taxeditor
.editor
.key
.polytomous
.operation
;
3 import org
.eclipse
.core
.commands
.ExecutionException
;
4 import org
.eclipse
.core
.commands
.operations
.IUndoContext
;
5 import org
.eclipse
.core
.runtime
.IAdaptable
;
6 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
7 import org
.eclipse
.core
.runtime
.IStatus
;
9 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
10 import eu
.etaxonomy
.taxeditor
.operation
.AbstractPostTaxonOperation
;
11 import eu
.etaxonomy
.taxeditor
.operation
.IPostOperationEnabled
;
14 * Operation responsible for refreshing node numbers of the Polytomous Key Nodes.
15 * The refresh is performed on the entire Key starting from the root.
20 public class RefreshNodeNumberingOperation
extends AbstractPostTaxonOperation
{
22 PolytomousKeyNode node
;
23 private PolytomousKeyNode childNode
;
25 public RefreshNodeNumberingOperation(String label
,
26 IUndoContext undoContext
,
27 PolytomousKeyNode node
,
28 IPostOperationEnabled postOperationEnabled
) {
29 super(label
, undoContext
, postOperationEnabled
);
34 * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
37 public IStatus
execute(IProgressMonitor monitor
, IAdaptable info
)
38 throws ExecutionException
{
40 node
.refreshNodeNumbering();
41 return postExecute(node
);
45 * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
48 public IStatus
redo(IProgressMonitor monitor
, IAdaptable info
)
49 throws ExecutionException
{
50 // TODO Auto-generated method stub
55 * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
58 public IStatus
undo(IProgressMonitor monitor
, IAdaptable info
)
59 throws ExecutionException
{
60 // TODO Auto-generated method stub