Revision 604e7242
Added by Andreas Müller over 1 year ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/e4/ConceptGraphViewE4.java | ||
---|---|---|
8 | 8 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
9 | 9 |
import org.eclipse.e4.ui.services.EMenuService; |
10 | 10 |
import org.eclipse.jface.viewers.StructuredSelection; |
11 |
import org.eclipse.jface.viewers.Viewer; |
|
12 | 11 |
import org.eclipse.swt.SWT; |
13 | 12 |
import org.eclipse.swt.widgets.Composite; |
14 | 13 |
import org.eclipse.zest.core.viewers.GraphViewer; |
... | ... | |
31 | 30 |
import eu.etaxonomy.taxeditor.view.e4.supplementaldata.SupplementalDataPartE4; |
32 | 31 |
|
33 | 32 |
/** |
34 |
* |
|
35 | 33 |
* @author pplitzner |
36 | 34 |
* @since Sep 27, 2017 |
37 |
* |
|
38 | 35 |
*/ |
39 |
public class ConceptGraphViewE4 extends AbstractCdmEditorPart { |
|
36 |
public class ConceptGraphViewE4 extends AbstractCdmEditorPart<GraphViewer> {
|
|
40 | 37 |
|
41 | 38 |
public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept.graph"; //$NON-NLS-1$ |
42 | 39 |
|
43 | 40 |
private LayoutAlgorithm layoutAlgoritm; |
44 | 41 |
|
45 |
/** |
|
46 |
* {@inheritDoc} |
|
47 |
*/ |
|
48 | 42 |
@Override |
49 | 43 |
public void selectionChanged_internal(Object selection, MPart activePart, MPart thisPart) { |
50 | 44 |
if(activePart==thisPart){ |
... | ... | |
69 | 63 |
return; |
70 | 64 |
} |
71 | 65 |
|
72 |
|
|
73 | 66 |
if(partObject instanceof TaxonEditor){ |
74 | 67 |
if (viewer.getControl() != null && !viewer.getControl().isDisposed()) { |
75 | 68 |
viewer.getControl().setEnabled(true); |
... | ... | |
77 | 70 |
TaxonEditorInput input = ((TaxonEditor) partObject).getEditorInput(); |
78 | 71 |
showViewer(new StructuredSelection(input), activePart, viewer); |
79 | 72 |
} |
80 |
|
|
81 | 73 |
} |
82 | 74 |
|
83 | 75 |
@Override |
... | ... | |
86 | 78 |
} |
87 | 79 |
|
88 | 80 |
@Override |
89 |
public Viewer getViewer() { |
|
81 |
public GraphViewer getViewer() {
|
|
90 | 82 |
return viewer; |
91 | 83 |
} |
92 | 84 |
|
Also available in: Unified diff
add viewer generics to AbstractCdmEditorPart, remove deprecated ViewerSorter and some other cleanup