1 package eu
.etaxonomy
.taxeditor
.bulkeditor
.handler
.defaultHandler
;
5 import org
.eclipse
.e4
.core
.di
.annotations
.Execute
;
6 import org
.eclipse
.e4
.ui
.model
.application
.ui
.menu
.MHandledMenuItem
;
7 import org
.eclipse
.ui
.PartInitException
;
9 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
10 import eu
.etaxonomy
.taxeditor
.bulkeditor
.BulkEditorUtil
;
11 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
12 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
14 public class OpenBulkEditorForIdentifiableEntityE4
{
17 public void execute(MHandledMenuItem menuItem
) {
18 String commandId
= menuItem
.getCommand().getElementId();
19 UUID uuid
= (UUID
) menuItem
.getTransientData().get(commandId
+".uuid");
20 IdentifiableEntity entity
= CdmStore
.getCommonService().find(IdentifiableEntity
.class, uuid
);
22 BulkEditorUtil
.openEditor(entity
);
23 } catch (PartInitException e
) {
24 MessagingUtils
.error(this.getClass(), "Bulk Editor could not be opened for "+entity
, e
);