Revision f6124bb9
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java | ||
---|---|---|
106 | 106 |
UUID entityUuid = selectedObject.getUuid(); |
107 | 107 |
try { |
108 | 108 |
if(selectedObject instanceof Classification){ |
109 |
NewClassificationWizard classificationWizard = new NewClassificationWizard(); |
|
110 |
classificationWizard.init(null, null); |
|
111 |
classificationWizard.setEntity((Classification) selectedObject); |
|
112 |
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), classificationWizard); |
|
113 |
dialog.open(); |
|
114 | 109 |
} |
115 | 110 |
else if(selectedObject instanceof TaxonNode){ |
116 |
EditorUtil.openTaxonNode(entityUuid); |
|
111 |
TaxonNode taxonNode = (TaxonNode)selectedObject; |
|
112 |
Classification classification = taxonNode.getClassification(); |
|
113 |
if(classification!=null && classification.getRootNode().equals(taxonNode)){ |
|
114 |
NewClassificationWizard classificationWizard = new NewClassificationWizard(); |
|
115 |
classificationWizard.init(null, null); |
|
116 |
classificationWizard.setEntity(classification); |
|
117 |
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), classificationWizard); |
|
118 |
dialog.open(); |
|
119 |
} |
|
120 |
else{ |
|
121 |
EditorUtil.openTaxonNode(entityUuid); |
|
122 |
} |
|
117 | 123 |
}else if(selectedObject instanceof TaxonBase){ |
118 | 124 |
TaxonBase taxonBase = (TaxonBase)selectedObject; |
119 | 125 |
if(taxonBase.isOrphaned()){ |
... | ... | |
142 | 148 |
} |
143 | 149 |
|
144 | 150 |
private static void openInBulkEditor(ICdmBase selectedObject) { |
145 |
ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
|
|
146 |
IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
|
|
151 |
ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); |
|
152 |
IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class); |
|
147 | 153 |
String openInBulkEditorCommand = "eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"; //$NON-NLS-1$ |
148 | 154 |
Command command = commandService.getCommand(openInBulkEditorCommand); |
149 | 155 |
if(command.isDefined()){ |
Also available in: Unified diff
ref #3866 Fix instanceOf check for classification taxon nodes