Revision 4fa58466
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptInBulkEditorHandlerE4.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.taxeditor.editor.view.concept.e4.handler; |
2 | 2 |
|
3 | 3 |
import org.eclipse.e4.ui.model.application.MApplication; |
4 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
|
4 | 5 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
5 | 6 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
7 |
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; |
|
6 | 8 |
|
7 | 9 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
8 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
|
10 |
import eu.etaxonomy.taxeditor.bulkeditor.AppModelId; |
|
11 |
import eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditorE4; |
|
12 |
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput; |
|
9 | 13 |
|
10 | 14 |
public class OpenRelatedConceptInBulkEditorHandlerE4 extends OpenRelatedConceptHandlerE4{ |
11 | 15 |
/** |
... | ... | |
13 | 17 |
*/ |
14 | 18 |
@Override |
15 | 19 |
protected void openConcept(TaxonBase<?> relatedTaxon, EModelService modelService, EPartService partService, MApplication application) { |
16 |
EditorUtil.openTaxonBaseE4(relatedTaxon.getUuid(), modelService, partService, application); |
|
20 |
AbstractBulkEditorInput<?> input = AbstractBulkEditorInput.NewInstance(relatedTaxon); |
|
21 |
MPart part = partService.createPart(AppModelId.PARTDESCRIPTOR_BULKEDITOR_EDITOR); |
|
22 |
part = partService.showPart(part, PartState.ACTIVATE); |
|
23 |
BulkEditorE4 bulkEditor = (BulkEditorE4) part.getObject(); |
|
24 |
bulkEditor.init(input); |
|
17 | 25 |
} |
18 | 26 |
} |
Also available in: Unified diff
ref #6911 Fix "Open in bulk editor" handler