Revision 25100c8d
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionToOtherTaxonHandler.java | ||
---|---|---|
58 | 58 |
|
59 | 59 |
@Execute |
60 | 60 |
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart, |
61 |
@Optional@Named(IServiceConstants.ACTIVE_SELECTION) TaxonDescription description,
|
|
61 |
@Optional@Named(IServiceConstants.ACTIVE_SELECTION) Object selection,
|
|
62 | 62 |
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, MMenuItem menuItem) { |
63 | 63 |
|
64 | 64 |
|
... | ... | |
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
List<TaxonDescription> descriptions = new ArrayList<TaxonDescription>(); |
82 |
TaxonDescription description = null; |
|
83 |
if (selection instanceof FeatureNodeContainer){ |
|
84 |
FeatureNodeContainer container = (FeatureNodeContainer)selection; |
|
85 |
description = (TaxonDescription) container.getDescription(); |
|
86 |
}else if (selection instanceof TaxonDescription){ |
|
87 |
description = (TaxonDescription)selection; |
|
88 |
} |
|
82 | 89 |
descriptions.add(description); |
83 | 90 |
|
84 | 91 |
// Choose the target taxon |
85 | 92 |
List<UUID> excludeTaxa = new ArrayList<UUID>(); |
93 |
|
|
86 | 94 |
excludeTaxa.add(descriptions.get(0).getTaxon().getUuid()); |
87 | 95 |
|
88 | 96 |
//get current taxon node |
Also available in: Unified diff
ref #6923: selection in moveDescriptionToOtherTaxonHandler is of type FeatureNodeContainer not Description