Revision 3a6a6dab
Added by Andreas Müller almost 4 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateNewTaxonBaseOperation.java | ||
---|---|---|
16 | 16 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
17 | 17 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
18 | 18 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
19 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
|
20 | 19 |
import eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditorE4; |
20 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
|
21 | 21 |
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation; |
22 | 22 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
23 | 23 |
|
24 | 24 |
/** |
25 | 25 |
* @author k.luther |
26 | 26 |
* @since 02.05.2018 |
27 |
* |
|
28 | 27 |
*/ |
29 | 28 |
public abstract class CreateNewTaxonBaseOperation extends AbstractPostTaxonOperation { |
30 | 29 |
|
31 |
/** |
|
32 |
* @param label |
|
33 |
* @param undoContext |
|
34 |
* @param taxonUuid |
|
35 |
*/ |
|
36 | 30 |
public CreateNewTaxonBaseOperation(String label, IUndoContext undoContext, UUID taxonUuid) { |
37 | 31 |
super(label, undoContext, taxonUuid); |
38 | 32 |
|
39 | 33 |
} |
40 | 34 |
|
41 |
/** |
|
42 |
* @param label |
|
43 |
* @param undoContext |
|
44 |
* @param taxon |
|
45 |
* @param postOperationEnabled |
|
46 |
*/ |
|
47 | 35 |
public CreateNewTaxonBaseOperation(String label, IUndoContext undoContext, Taxon taxon, |
48 | 36 |
IPostOperationEnabled postOperationEnabled) { |
49 | 37 |
super(label, undoContext, taxon, postOperationEnabled); |
50 | 38 |
} |
51 | 39 |
|
52 |
/** |
|
53 |
* @param newTaxonBase |
|
54 |
*/ |
|
55 | 40 |
protected void addToSaveList(CdmBase newCdmBase) { |
56 | 41 |
TaxonNameEditorE4 editor = null; |
57 |
Object activePart = EditorUtil.getActivePart();
|
|
42 |
Object activePart = AbstractUtility.getActivePart();
|
|
58 | 43 |
if (activePart instanceof TaxonNameEditorE4){ |
59 | 44 |
editor = (TaxonNameEditorE4) activePart; |
60 | 45 |
if (newCdmBase instanceof Synonym){ |
... | ... | |
67 | 52 |
editor.setDirty(); |
68 | 53 |
} |
69 | 54 |
} |
70 |
|
|
71 | 55 |
} |
Also available in: Unified diff
cleanup