Revision f13a970a
Added by Patrick Plitzner almost 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java | ||
---|---|---|
23 | 23 |
import org.eclipse.swt.widgets.Label; |
24 | 24 |
import org.eclipse.ui.ISelectionListener; |
25 | 25 |
import org.eclipse.ui.ISelectionService; |
26 |
import org.eclipse.ui.IWorkbenchPart; |
|
27 | 26 |
import org.eclipse.ui.part.PageBook; |
28 | 27 |
import org.eclipse.ui.part.ViewPart; |
29 | 28 |
|
... | ... | |
50 | 49 |
|
51 | 50 |
public static IStructuredSelection EMPTY_SELECTION = new StructuredSelection(); |
52 | 51 |
|
53 |
protected IWorkbenchPart part;
|
|
52 |
protected Object part;
|
|
54 | 53 |
|
55 | 54 |
private PageBook pageBook; |
56 | 55 |
|
... | ... | |
75 | 74 |
setInitialSelection(); |
76 | 75 |
} |
77 | 76 |
|
78 |
/** |
|
79 |
* |
|
80 |
*/ |
|
81 | 77 |
private void setInitialSelection() { |
82 |
selectionChanged(AbstractUtility.getActivePart(), getInitialSelection()); |
|
78 |
selectionChanged(AbstractUtility.getActiveWorkbenchPart(), getInitialSelection());
|
|
83 | 79 |
} |
84 | 80 |
|
85 | 81 |
/** |
... | ... | |
105 | 101 |
* @param part a {@link org.eclipse.ui.IWorkbenchPart} object. |
106 | 102 |
* @param selection a {@link org.eclipse.jface.viewers.ISelection} object. |
107 | 103 |
*/ |
108 |
public void showViewer(IWorkbenchPart part, IStructuredSelection selection){
|
|
104 |
public void showViewer(Object part, IStructuredSelection selection){
|
|
109 | 105 |
this.part = part; |
110 | 106 |
|
111 | 107 |
Object element = selection.getFirstElement(); |
... | ... | |
224 | 220 |
// TODO Auto-generated method stub |
225 | 221 |
return null; |
226 | 222 |
} |
227 |
|
|
223 |
|
|
228 | 224 |
protected String createPartTitle(Object selectedObject){ |
229 | 225 |
if(selectedObject!=null){ |
230 | 226 |
return getViewName()+": "+selectedObject; //$NON-NLS-1$ |
231 | 227 |
} |
232 | 228 |
return getViewName(); |
233 | 229 |
} |
234 |
|
|
230 |
|
|
235 | 231 |
protected abstract String getViewName(); |
236 | 232 |
} |
Also available in: Unified diff
ref #6596 Refactored selection handling to support e3 and e4 parts