Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupE4.java | ||
---|---|---|
12 | 12 |
import java.util.ArrayList; |
13 | 13 |
import java.util.List; |
14 | 14 |
|
15 |
import org.eclipse.e4.core.contexts.IEclipseContext; |
|
15 | 16 |
import org.eclipse.swt.SWT; |
16 | 17 |
import org.eclipse.swt.dnd.DND; |
17 | 18 |
import org.eclipse.swt.dnd.DropTarget; |
... | ... | |
42 | 43 |
|
43 | 44 |
private Composite control; |
44 | 45 |
|
46 |
private IEclipseContext context; |
|
47 |
|
|
45 | 48 |
private final List<AbstractGroupedContainerE4> groupedContainers = new ArrayList<>(); |
46 | 49 |
|
47 | 50 |
protected TaxonNameEditorE4 editor; |
... | ... | |
51 | 54 |
|
52 | 55 |
public AbstractGroupE4(TaxonNameEditorE4 editor){ |
53 | 56 |
this.editor = editor; |
57 |
this.context = editor.getContext(); |
|
54 | 58 |
} |
55 | 59 |
|
56 | 60 |
protected void createContent(){ |
... | ... | |
84 | 88 |
|
85 | 89 |
public void add(AbstractGroupedContainerE4 groupedContainer){ |
86 | 90 |
groupedContainers.add(groupedContainer); |
87 |
groupedContainer.setGroup(this); |
|
88 | 91 |
} |
89 | 92 |
|
90 | 93 |
public void remove(AbstractGroupedContainerE4 groupedContainer){ |
... | ... | |
119 | 122 |
} |
120 | 123 |
} |
121 | 124 |
|
125 |
@Override |
|
126 |
public IEclipseContext getContext() { |
|
127 |
return context; |
|
128 |
} |
|
129 |
|
|
122 | 130 |
@Override |
123 | 131 |
public TaxonNameEditorE4 getEditor() { |
124 | 132 |
return editor; |
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution