Revision 8e0e024c
Added by Katja Luther 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.AbstractPostOperation; |
|
32 |
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
|
|
33 | 33 |
|
34 | 34 |
/** |
35 | 35 |
* |
... | ... | |
50 | 50 |
|
51 | 51 |
editor = (TaxonNameEditorE4) activePart.getObject(); |
52 | 52 |
|
53 |
if (!EditorUtil.forceUserSaveE4Editor(editor, shell)){ |
|
54 |
return ; |
|
55 |
} |
|
56 |
Object selectedElement = selection.getFirstElement(); |
|
53 |
Object selectedElement = selection.getFirstElement(); |
|
57 | 54 |
|
58 |
AbstractPostOperation operation = null;
|
|
55 |
AbstractPostTaxonOperation operation = null;
|
|
59 | 56 |
if(selectedElement instanceof Taxon){ |
60 | 57 |
operation = new ChangeConceptRelationshipTypeOperation(menuItem.getLocalizedLabel(), |
61 | 58 |
editor.getUndoContext(), editor.getTaxon(), (Taxon) selectedElement, TaxonRelationshipType.MISAPPLIED_NAME_FOR(), editor); |
62 | 59 |
} |
63 | 60 |
if(selectedElement instanceof Synonym){ |
64 |
operation = new ChangeSynonymToMisapplicationOperation(menuItem.getLocalizedLabel(),
|
|
65 |
editor.getUndoContext(), editor.getTaxon(), (Synonym) selectedElement, editor);
|
|
61 |
operation = new ChangeSynonymToMisapplicationOperation(menuItem.getLocalizedLabel(),
|
|
62 |
editor.getUndoContext(), editor.getTaxon(), (Synonym) selectedElement, editor);
|
|
66 | 63 |
} |
67 |
|
|
68 |
|
|
64 |
if (!EditorUtil.forceUserSaveE4Editor(editor, shell)){ |
|
65 |
return ; |
|
66 |
} |
|
67 |
//editor.getEditorInput().addOperation(operation); |
|
69 | 68 |
AbstractUtility.executeOperation(operation, sync); |
70 | 69 |
} |
71 | 70 |
|
Also available in: Unified diff
ref #7761: invalid designations are displayed in name editor and details view like MAN