2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.bulkeditor
.e4
.handler
;
10 import org
.eclipse
.core
.commands
.ParameterizedCommand
;
11 import org
.eclipse
.e4
.core
.di
.annotations
.Execute
;
12 import org
.eclipse
.e4
.ui
.model
.application
.ui
.basic
.MPart
;
13 import org
.eclipse
.e4
.ui
.workbench
.modeling
.EPartService
;
14 import org
.eclipse
.e4
.ui
.workbench
.modeling
.EPartService
.PartState
;
16 import eu
.etaxonomy
.taxeditor
.bulkeditor
.AppModelId
;
17 import eu
.etaxonomy
.taxeditor
.bulkeditor
.IBulkEditorConstants
;
18 import eu
.etaxonomy
.taxeditor
.bulkeditor
.e4
.BulkEditorE4
;
19 import eu
.etaxonomy
.taxeditor
.bulkeditor
.input
.AbstractBulkEditorInput
;
20 import eu
.etaxonomy
.taxeditor
.bulkeditor
.input
.BulkEditorInputType
;
28 public class OpenBulkEditorHandlerE4
{
31 public void execute(ParameterizedCommand command
, EPartService partService
) {
32 String inputTypeId
= (String
) command
.getParameterMap().get(IBulkEditorConstants
.INPUT_TYPE_PARAMETER_ID
);
33 BulkEditorInputType inputType
= BulkEditorInputType
.getById(inputTypeId
);
35 MPart part
= partService
.createPart(AppModelId
.PARTDESCRIPTOR_BULKEDITOR_EDITOR
);
36 partService
.showPart(part
, PartState
.ACTIVATE
);
37 BulkEditorE4 bulkEditor
= (BulkEditorE4
) part
.getObject();
38 bulkEditor
.init(AbstractBulkEditorInput
.NewInstance(inputType
));