1 | @Override↵ | | 1 | @Override↵
|
2 | public void setActiveWorkbenchPart(IWorkbenchPart workbenchPart)↵ | | 2 | public void setActiveWorkbenchPart(IWorkbenchPart workbenchPart)↵
|
3 | {↵ | | 3 | {↵
|
4 | if (editingDomain != null)↵ | | 4 | if (editingDomain != null)↵
|
5 | {↵ | | 5 | {↵
|
6 | editingDomain.getCommandStack().removeCommandStackListener(this);↵ | | 6 | editingDomain.getCommandStack().removeCommandStackListener(this);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | super.setActiveWorkbenchPart(workbenchPart);↵ | | 8 | super.setActiveWorkbenchPart(workbenchPart);↵
|
|
9 | if (editingDomain != null)↵ | | 9 | if (editingDomain != null)↵
|
10 | {↵ | | 10 | {↵
|
11 | editingDomain.getCommandStack().addCommandStackListener(this);↵ | | 11 | editingDomain.getCommandStack().addCommandStackListener(this);↵
|
12 | }↵ | | 12 | }↵
|
13 | }↵ | | 13 | }↵
|
|
14 | public void commandStackChanged(EventObject event)↵ | | 14 | public void commandStackChanged(EventObject event)↵
|
15 | {↵ | | 15 | {↵
|
16 | selectionChanged(action, ((ISelectionProvider)workbenchPart).getSelection());↵ | | 16 | selectionChanged(action, ((ISelectionProvider)workbenchPart).getSelection());↵
|
17 | }↵ | | 17 | }↵
|
|
18 | @Override↵ | | 18 | @Override↵
|
19 | public void selectionChanged(IAction action, ISelection selection)↵ | | 19 | public void selectionChanged(IAction action, ISelection selection)↵
|
20 | {↵ | | 20 | {↵
|
21 | if (selection instanceof IComposedSelection)↵ | | 21 | if (selection instanceof IComposedSelection)↵
|
22 | {↵ | | 22 | {↵
|
23 | super.selectionChanged(action,((IComposedSelection)selection).getCombinedSelection());↵ | | 23 | super.selectionChanged(action,((IComposedSelection)selection).getCombinedSelection());↵
|
24 | }↵ | | 24 | }↵
|
25 | else↵ | | 25 | else↵
|
26 | {↵ | | 26 | {↵
|
27 | super.selectionChanged(action, selection);↵ | | 27 | super.selectionChanged(action, selection);↵
|
28 | }↵ | | 28 | }↵
|
29 | }↵ | | 29 | }↵
|
|
30 | /**↵ | | 30 | /**↵
|
31 | * This returns the image that is used if the command does not provide an override.↵ | | 31 | * This returns the image that is used if the command does not provide an override.↵
|
32 | */↵ | | 32 | */↵
|
33 | protected Object getDefaultImage()↵ | | 33 | protected Object getDefaultImage()↵
|
34 | {↵ | | 34 | {↵
|
35 | return MappingPlugin.getPlugin().getImage("full/etool16/CreateOneToOneMapping"); | | 35 | return MappingPlugin.getPlugin().getImage("full/etool16/MatchByName");
|