Revision 8ef15f41
Added by Katja Luther over 8 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java | ||
---|---|---|
9 | 9 |
import org.eclipse.ui.IEditorInput; |
10 | 10 |
import org.eclipse.ui.handlers.HandlerUtil; |
11 | 11 |
|
12 |
import java.util.ArrayList; |
|
13 |
import java.util.List; |
|
14 |
import java.util.UUID; |
|
15 |
|
|
12 | 16 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
13 | 17 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
14 | 18 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
... | ... | |
48 | 52 |
} |
49 | 53 |
|
50 | 54 |
Synonym synonym = (Synonym) selection.getFirstElement(); |
55 |
Taxon oldParent = ((TaxonEditorInput)input).getTaxon(); |
|
56 |
List<UUID> excludeTaxa = new ArrayList<UUID>(); |
|
57 |
excludeTaxa.add(oldParent.getUuid()); |
|
58 |
|
|
51 | 59 |
TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select new accepted taxon", null, null, ((TaxonEditorInput)input).getTaxonNode().getClassification()); |
52 | 60 |
if(newParentNode!=null){ |
53 |
Taxon oldParent = ((TaxonEditorInput)input).getTaxon(); |
|
54 |
|
|
55 |
MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(), |
|
61 |
MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(), |
|
56 | 62 |
oldParent.getUuid(), synonym.getUuid(), newParentNode.getTaxon(), editor); |
57 | 63 |
|
58 | 64 |
AbstractUtility.executeOperation(operation); |
Also available in: Unified diff
last changes for #5325