2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.operations
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.core
.commands
.operations
.AbstractOperation
;
14 import org
.eclipse
.core
.commands
.operations
.IUndoContext
;
15 import org
.eclipse
.core
.runtime
.IStatus
;
16 import org
.eclipse
.core
.runtime
.Status
;
18 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
19 import eu
.etaxonomy
.taxeditor
.controller
.EditorController
;
26 public abstract class AbstractEditorOperation
extends AbstractOperation
{
28 @SuppressWarnings("unused")
29 private static final Logger logger
= Logger
30 .getLogger(AbstractEditorOperation
.class);
33 * A reference to the taxon the concrete operation is working on
35 protected Taxon taxon
;
37 public AbstractEditorOperation(String label
, IUndoContext undoContext
,
40 addContext(undoContext
);
49 protected IStatus
redrawOpenEditor() {
50 return EditorController
.redraw(taxon
) ? Status
.OK_STATUS
: Status
.CANCEL_STATUS
;