Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/CreateDescriptionHandler.java | ||
---|---|---|
22 | 22 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart; |
23 | 23 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateSpecimenDescriptionOperation; |
24 | 24 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.CreateTaxonDescriptionOperation; |
25 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
|
26 | 25 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
27 | 26 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
28 | 27 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
... | ... | |
52 | 51 |
if(viewerInput instanceof SpecimenOrObservationBase<?>){ |
53 | 52 |
try { |
54 | 53 |
operation = new CreateSpecimenDescriptionOperation(event.getCommand().getName(), EditorUtil.getUndoContext(), (SpecimenOrObservationBase<?>) viewerInput, postOperationEnabled); |
55 |
AbstractUtility.executeOperation(operation); |
|
56 | 54 |
} catch (NotDefinedException e) { |
57 | 55 |
MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$ |
58 | 56 |
} |
... | ... | |
60 | 58 |
if(viewerInput instanceof TaxonBase){ |
61 | 59 |
try{ |
62 | 60 |
operation = createTaxonOperation(event.getCommand().getName(), (Taxon) viewerInput, postOperationEnabled); |
63 |
AbstractUtility.executeOperation(operation); |
|
64 | 61 |
} catch (NotDefinedException e) { |
65 | 62 |
MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$ |
66 | 63 |
} |
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution