Revision 3aacef44
Added by Katja Luther almost 7 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/CreateClassificationHierarchyHandler.java | ||
---|---|---|
9 | 9 |
import org.eclipse.ui.handlers.HandlerUtil; |
10 | 10 |
|
11 | 11 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
12 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
|
12 | 13 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
13 | 14 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
14 | 15 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
... | ... | |
34 | 35 |
ISelection currentSelection = HandlerUtil.getCurrentSelection(event); |
35 | 36 |
if (currentSelection instanceof IStructuredSelection) { |
36 | 37 |
Object selectedElement = ((IStructuredSelection) currentSelection).getFirstElement(); |
37 |
if (selectedElement instanceof Classification) {
|
|
38 |
if (selectedElement instanceof TaxonNode && !((TaxonNode)selectedElement).hasTaxon()) {
|
|
38 | 39 |
|
39 |
Classification classification = (Classification) selectedElement;
|
|
40 |
Classification classification = ((TaxonNode) selectedElement).getClassification();
|
|
40 | 41 |
try { |
41 | 42 |
TaxonNavigator taxonNavigator = (TaxonNavigator)AbstractUtility.showView(TaxonNavigator.ID); |
42 | 43 |
// IClassificationService service = CdmStore.getService(IClassificationService.class); |
Also available in: Unified diff
change label for classification in status bar and fix createClassificationHierarchyHandler