Revision b52863af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorUtil.java | ||
---|---|---|
11 | 11 |
|
12 | 12 |
import org.eclipse.core.commands.operations.IOperationHistory; |
13 | 13 |
import org.eclipse.core.commands.operations.IUndoContext; |
14 |
import org.eclipse.e4.ui.model.application.MApplication; |
|
15 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
|
16 |
import org.eclipse.e4.ui.model.application.ui.basic.MPartStack; |
|
17 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
|
18 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
19 |
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; |
|
14 | 20 |
|
21 |
import eu.etaxonomy.taxeditor.bulkeditor.e4.BulkEditorE4; |
|
22 |
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput; |
|
15 | 23 |
import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin; |
16 | 24 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
25 |
import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility; |
|
17 | 26 |
|
18 | 27 |
/** |
19 | 28 |
* <p>BulkEditorUtil class.</p> |
... | ... | |
34 | 43 |
return TaxeditorBulkeditorPlugin.PLUGIN_ID; |
35 | 44 |
} |
36 | 45 |
|
46 |
public static void openBulkEditor(AbstractBulkEditorInput<?> input, |
|
47 |
EModelService modelService, EPartService partService, MApplication application){ |
|
48 |
MPart part = partService.createPart(AppModelId.PARTDESCRIPTOR_BULKEDITOR_EDITOR); |
|
49 |
MPartStack editorAreaPartStack = WorkbenchUtility.getEditorAreaPartStack(application, modelService); |
|
50 |
if(editorAreaPartStack!=null){ |
|
51 |
editorAreaPartStack.getChildren().add(part); |
|
52 |
} |
|
53 |
part = partService.showPart(part, PartState.ACTIVATE); |
|
54 |
BulkEditorE4 bulkEditor = (BulkEditorE4) part.getObject(); |
|
55 |
bulkEditor.init(input); |
|
56 |
} |
|
57 |
|
|
37 | 58 |
/** |
38 | 59 |
* <p>getUndoContext</p> |
39 | 60 |
* |
Also available in: Unified diff
ref #6925 Open bulk editor in editor area