Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/FactualDataPartE4.java | ||
---|---|---|
16 | 16 |
|
17 | 17 |
import javax.annotation.PostConstruct; |
18 | 18 |
|
19 |
import org.eclipse.e4.core.contexts.ContextInjectionFactory; |
|
20 |
import org.eclipse.e4.core.contexts.IEclipseContext; |
|
19 | 21 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
20 | 22 |
import org.eclipse.e4.ui.services.EMenuService; |
21 | 23 |
import org.eclipse.jface.action.Action; |
... | ... | |
88 | 90 |
private DescriptiveContentProvider provider; |
89 | 91 |
|
90 | 92 |
@PostConstruct |
91 |
public void create(Composite parent, EMenuService menuService, MPart thisPart) { |
|
93 |
public void create(Composite parent, EMenuService menuService, MPart thisPart, |
|
94 |
IEclipseContext context) { |
|
92 | 95 |
TreeViewer treeViewer = new TreeViewer(new Tree(parent, SWT.H_SCROLL |
93 | 96 |
| SWT.V_SCROLL | SWT.FULL_SELECTION)); |
94 | 97 |
|
... | ... | |
102 | 105 |
Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() }; |
103 | 106 |
treeViewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener( |
104 | 107 |
this)); |
108 |
DescriptionElementDropAdapter dropListener = new DescriptionElementDropAdapter(viewer); |
|
109 |
ContextInjectionFactory.inject(dropListener, context); |
|
105 | 110 |
treeViewer.addDropSupport(dndOperations, transfers, |
106 |
new DescriptionElementDropAdapter(viewer));
|
|
111 |
dropListener);
|
|
107 | 112 |
|
108 | 113 |
viewer = treeViewer; |
109 | 114 |
|
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution