Revision 49a64920
Added by Cherian Mathew almost 11 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/derivedunit/handler/AbstractAddDerivedUnitFacadeMediaHandler.java | ||
---|---|---|
21 | 21 |
import org.eclipse.ui.IWorkbenchPart; |
22 | 22 |
import org.eclipse.ui.handlers.HandlerUtil; |
23 | 23 |
|
24 |
import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase;
|
|
24 |
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit; |
|
25 | 25 |
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor; |
26 | 26 |
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil; |
27 | 27 |
import eu.etaxonomy.taxeditor.bulkeditor.derivedunit.operation.AddDerivedUnitFacadeMediaOperation; |
... | ... | |
55 | 55 |
|
56 | 56 |
if(selection instanceof IStructuredSelection){ |
57 | 57 |
Object element = ((IStructuredSelection) selection).getFirstElement(); |
58 |
if(element instanceof DerivedUnitBase){
|
|
58 |
if(element instanceof DerivedUnit){ |
|
59 | 59 |
|
60 | 60 |
try{ |
61 |
AbstractPostOperation operation = new AddDerivedUnitFacadeMediaOperation(event.getCommand().getName(), BulkEditorUtil.getUndoContext(), (DerivedUnitBase) element, getMode(), postOperationEnabled);
|
|
61 |
AbstractPostOperation operation = new AddDerivedUnitFacadeMediaOperation(event.getCommand().getName(), BulkEditorUtil.getUndoContext(), (DerivedUnit) element, getMode(), postOperationEnabled); |
|
62 | 62 |
BulkEditorUtil.executeOperation(operation); |
63 | 63 |
} catch (NotDefinedException e) { |
64 | 64 |
BulkEditorUtil.warn(getClass(), "Command name not set."); |
Also available in: Unified diff
Aligning Editor with 3.3 model changes. First phase commit which updates only the classes.
Branch not compilable at the moment.