Revision 4e956294
Added by Andreas Müller over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/ChangeToMisapplicationHandlerE4.java | ||
---|---|---|
29 | 29 |
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeConceptRelationshipTypeOperation; |
30 | 30 |
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToMisapplicationOperation; |
31 | 31 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
32 |
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
|
|
32 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
|
33 | 33 |
|
34 | 34 |
/** |
35 | 35 |
* |
... | ... | |
50 | 50 |
|
51 | 51 |
editor = (TaxonNameEditorE4) activePart.getObject(); |
52 | 52 |
|
53 |
Object selectedElement = selection.getFirstElement(); |
|
53 |
if (!EditorUtil.forceUserSaveE4Editor(editor, shell)){ |
|
54 |
return ; |
|
55 |
} |
|
56 |
Object selectedElement = selection.getFirstElement(); |
|
54 | 57 |
|
55 |
AbstractPostTaxonOperation operation = null;
|
|
58 |
AbstractPostOperation operation = null;
|
|
56 | 59 |
if(selectedElement instanceof Taxon){ |
57 | 60 |
operation = new ChangeConceptRelationshipTypeOperation(menuItem.getLocalizedLabel(), |
58 | 61 |
editor.getUndoContext(), editor.getTaxon(), (Taxon) selectedElement, TaxonRelationshipType.MISAPPLIED_NAME_FOR(), editor); |
59 | 62 |
} |
60 | 63 |
if(selectedElement instanceof Synonym){ |
61 |
operation = new ChangeSynonymToMisapplicationOperation(menuItem.getLocalizedLabel(), |
|
62 |
editor.getUndoContext(), editor.getTaxon(), (Synonym) selectedElement, editor); |
|
63 |
} |
|
64 |
if (!EditorUtil.forceUserSaveE4Editor(editor, shell)){ |
|
65 |
return ; |
|
64 |
operation = new ChangeSynonymToMisapplicationOperation(menuItem.getLocalizedLabel(), |
|
65 |
editor.getUndoContext(), editor.getTaxon(), (Synonym) selectedElement, editor); |
|
66 | 66 |
} |
67 |
//editor.getEditorInput().addOperation(operation); |
|
67 |
|
|
68 |
|
|
68 | 69 |
AbstractUtility.executeOperation(operation, sync); |
69 | 70 |
} |
70 | 71 |
|
Also available in: Unified diff
Revert "ref #7761: invalid designations are displayed in name editor and details view like MAN"
This reverts commit 8e0e024c985ffbbe2ce2421270927059c9abf0cc.