1 package eu
.etaxonomy
.taxeditor
.editor
.handler
.defaultHandler
;
4 import org
.eclipse
.core
.commands
.ExecutionEvent
;
5 import org
.eclipse
.ui
.PartInitException
;
7 import eu
.etaxonomy
.cdm
.api
.service
.ITaxonService
;
8 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
9 import eu
.etaxonomy
.taxeditor
.editor
.EditorUtil
;
10 import eu
.etaxonomy
.taxeditor
.editor
.l10n
.Messages
;
11 import eu
.etaxonomy
.taxeditor
.handler
.defaultHandler
.DefaultOpenHandlerBase
;
12 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
13 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
16 public class DefaultOpenTaxonEditorForTaxonBaseHandler
extends DefaultOpenHandlerBase
<TaxonBase
> {
19 protected TaxonBase
getEntity(UUID uuid
) {
20 return CdmStore
.getService(ITaxonService
.class).load(uuid
);
24 protected void open(ExecutionEvent event
, TaxonBase entity
) {
26 EditorUtil
.openTaxonBaseE4(entity
.getUuid());
27 } catch (PartInitException e
) {
28 MessagingUtils
.error(DefaultOpenTaxonEditorForTaxonBaseHandler
.class, Messages
.DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN
+entity
, e
);