Revision ddf52a47
Added by Patrick Plitzner almost 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditor.java | ||
---|---|---|
25 | 25 |
import org.eclipse.e4.ui.services.EMenuService; |
26 | 26 |
import org.eclipse.e4.ui.workbench.modeling.ESelectionService; |
27 | 27 |
import org.eclipse.jface.viewers.ISelectionChangedListener; |
28 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
28 | 29 |
import org.eclipse.jface.viewers.SelectionChangedEvent; |
29 | 30 |
import org.eclipse.jface.viewers.TreeViewer; |
30 | 31 |
import org.eclipse.swt.SWT; |
... | ... | |
44 | 45 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled; |
45 | 46 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
46 | 47 |
import eu.etaxonomy.taxeditor.ui.dialog.selection.FeatureTreeSelectionDialog; |
48 |
import eu.etaxonomy.taxeditor.workbench.part.IE4ViewerPart; |
|
47 | 49 |
|
48 | 50 |
/** |
49 | 51 |
* |
... | ... | |
52 | 54 |
* |
53 | 55 |
*/ |
54 | 56 |
public class FeatureTreeEditor implements ICdmEntitySessionEnabled, |
55 |
ModifyListener, ISelectionChangedListener { |
|
57 |
ModifyListener, ISelectionChangedListener, IE4ViewerPart {
|
|
56 | 58 |
|
57 | 59 |
private ConversationHolder conversation; |
58 | 60 |
|
... | ... | |
148 | 150 |
} |
149 | 151 |
} |
150 | 152 |
|
151 |
public void refresh(){ |
|
153 |
@Override |
|
154 |
public void refresh(){ |
|
152 | 155 |
composite.getViewer().refresh(); |
153 | 156 |
} |
154 | 157 |
|
... | ... | |
156 | 159 |
return composite.getViewer(); |
157 | 160 |
} |
158 | 161 |
|
162 |
/** |
|
163 |
* {@inheritDoc} |
|
164 |
*/ |
|
165 |
@Override |
|
166 |
public IStructuredSelection getSelection() { |
|
167 |
return (IStructuredSelection) composite.getViewer().getSelection(); |
|
168 |
} |
|
169 |
|
|
159 | 170 |
@Persist |
160 | 171 |
public void save(){ |
161 | 172 |
if (!conversation.isBound()) { |
Also available in: Unified diff
ref #6762 Add context menu to CharacterEditor