1 | super.createControl(parent);↵ | | 1 | super.createControl(parent);↵
|
2 | contentOutlineViewer = getTreeViewer();↵ | | 2 | contentOutlineViewer = getTreeViewer();↵
|
3 | contentOutlineViewer.addSelectionChangedListener(this);↵ | | 3 | contentOutlineViewer.addSelectionChangedListener(this);↵
|
|
4 | // Set up the tree viewer.↵ | | 4 | // Set up the tree viewer.↵
|
5 | //↵ | | 5 | //↵
|
6 | contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));↵ | | 6 | contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));↵
|
7 | contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));↵ | | 7 | contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));↵
|
8 | contentOutlineViewer.setInput(editingDomain.getResourceSet());↵ | | 8 | contentOutlineViewer.setInput(editingDomain.getResourceSet());↵
|
|
9 | // Make sure our popups work.↵ | | 9 | // Make sure our popups work.↵
|
10 | //↵ | | 10 | //↵
|
11 | createContextMenuFor(contentOutlineViewer);↵ | | 11 | createContextMenuFor(contentOutlineViewer);↵
|
|
12 | if (!editingDomain.getResourceSet().getResources().isEmpty())↵ | | 12 | if (!editingDomain.getResourceSet().getResources().isEmpty())↵
|
13 | {↵ | | 13 | {↵
|
14 | // Select the root object in the view.↵ | | 14 | // Select the root object in the view.↵
|
15 | //↵ | | 15 | //↵
|
16 | contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);↵ | | 16 | contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);↵
|
17 | }↵ | | 17 | }↵
|
18 | }↵ | | 18 | }↵
|
|
19 | @Override↵ | | 19 | @Override↵
|
20 | public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)↵ | | 20 | public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)↵
|
21 | {↵ | | 21 | {↵
|
22 | super.makeContributions(menuManager, toolBarManager, statusLineManager);↵ | | 22 | super.makeContributions(menuManager, toolBarManager, statusLineManager);↵
|
23 | contentOutlineStatusLineManager = statusLineManager;↵ | | 23 | contentOutlineStatusLineManager = statusLineManager;↵
|
24 | }↵ | | 24 | }↵
|
|
25 | @Override↵ | | 25 | @Override↵
|
26 | public void setActionBars(IActionBars actionBars)↵ | | 26 | public void setActionBars(IActionBars actionBars)↵
|
27 | {↵ | | 27 | {↵
|
28 | super.setActionBars(actionBars);↵ | | 28 | super.setActionBars(actionBars);↵
|
29 | getActionBarContributor().shareGlobalActions(this, actionBars); | | 29 | getActionBarContributor().shareGlobalActions(this, actionBars);
|