Revision 61c51c84
Added by Patrick Plitzner about 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java | ||
---|---|---|
18 | 18 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
19 | 19 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
20 | 20 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
21 |
import eu.etaxonomy.taxeditor.editor.Messages; |
|
21 | 22 |
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor; |
22 | 23 |
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput; |
23 | 24 |
import eu.etaxonomy.taxeditor.editor.name.operation.MoveSynonymToAnotherAcceptedTaxonOperation; |
... | ... | |
45 | 46 |
} |
46 | 47 |
|
47 | 48 |
if (!(input instanceof TaxonEditorInput)) { |
48 |
logger.error("Editor input is not TaxonEditorInput"); |
|
49 |
logger.error("Editor input is not TaxonEditorInput"); //$NON-NLS-1$
|
|
49 | 50 |
return null; |
50 | 51 |
} |
51 | 52 |
|
52 | 53 |
if (selection==null || !(selection.getFirstElement() instanceof Synonym)) { |
53 |
MessagingUtils.warningDialog("No selection", this, "No synonym selected");
|
|
54 |
logger.error("Selection does not contain a Synonym"); |
|
54 |
MessagingUtils.warningDialog(Messages.MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION, this, Messages.MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE);
|
|
55 |
logger.error("Selection does not contain a Synonym"); //$NON-NLS-1$
|
|
55 | 56 |
return null; |
56 | 57 |
} |
57 | 58 |
|
... | ... | |
61 | 62 |
excludeTaxa.add(oldParent.getUuid()); |
62 | 63 |
|
63 | 64 |
|
64 |
TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select new accepted taxon", excludeTaxa, null, ((TaxonEditorInput)input).getTaxonNode().getClassification());
|
|
65 |
TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), Messages.MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON, excludeTaxa, null, ((TaxonEditorInput)input).getTaxonNode().getClassification());
|
|
65 | 66 |
|
66 | 67 |
if(newParentNode!=null){ |
67 |
MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(),
|
|
68 |
MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation(Messages.MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON, EditorUtil.getUndoContext(),
|
|
68 | 69 |
oldParent.getUuid(), synonym.getUuid(), newParentNode.getTaxon(), editor); |
69 | 70 |
|
70 | 71 |
AbstractUtility.executeOperation(operation); |
Also available in: Unified diff
ref #4611 i18n for taxeditor.editor plugin