Lines 27-32
Link Here
|
27 |
import org.eclipse.ui.IActionBars; |
27 |
import org.eclipse.ui.IActionBars; |
28 |
import org.eclipse.ui.IEditorActionBarContributor; |
28 |
import org.eclipse.ui.IEditorActionBarContributor; |
29 |
import org.eclipse.ui.IEditorPart; |
29 |
import org.eclipse.ui.IEditorPart; |
|
|
30 |
import org.eclipse.ui.ISharedImages; |
30 |
import org.eclipse.ui.actions.ActionFactory; |
31 |
import org.eclipse.ui.actions.ActionFactory; |
31 |
import org.eclipse.ui.forms.editor.IFormPage; |
32 |
import org.eclipse.ui.forms.editor.IFormPage; |
32 |
import org.eclipse.ui.ide.IDEActionFactory; |
33 |
import org.eclipse.ui.ide.IDEActionFactory; |
Lines 50-56
Link Here
|
50 |
private ClipboardAction fPasteAction; |
51 |
private ClipboardAction fPasteAction; |
51 |
|
52 |
|
52 |
private Hashtable fGlobalActions = new Hashtable(); |
53 |
private Hashtable fGlobalActions = new Hashtable(); |
53 |
|
54 |
|
|
|
55 |
private ISharedImages fSharedImages; |
56 |
|
54 |
class GlobalAction extends Action implements IUpdate { |
57 |
class GlobalAction extends Action implements IUpdate { |
55 |
private String id; |
58 |
private String id; |
56 |
|
59 |
|
Lines 89-94
Link Here
|
89 |
public CutAction() { |
92 |
public CutAction() { |
90 |
super(ActionFactory.CUT.getId()); |
93 |
super(ActionFactory.CUT.getId()); |
91 |
setText(PDEUIMessages.EditorActions_cut); |
94 |
setText(PDEUIMessages.EditorActions_cut); |
|
|
95 |
setImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_CUT)); |
96 |
setDisabledImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED)); |
97 |
setActionDefinitionId("org.eclipse.ui.edit.cut"); //$NON-NLS-1$ |
92 |
} |
98 |
} |
93 |
|
99 |
|
94 |
public void selectionChanged(ISelection selection) { |
100 |
public void selectionChanged(ISelection selection) { |
Lines 100-105
Link Here
|
100 |
public CopyAction() { |
106 |
public CopyAction() { |
101 |
super(ActionFactory.COPY.getId()); |
107 |
super(ActionFactory.COPY.getId()); |
102 |
setText(PDEUIMessages.EditorActions_copy); |
108 |
setText(PDEUIMessages.EditorActions_copy); |
|
|
109 |
setImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); |
110 |
setDisabledImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); |
111 |
setActionDefinitionId("org.eclipse.ui.edit.copy"); //$NON-NLS-1$ |
103 |
} |
112 |
} |
104 |
|
113 |
|
105 |
public void selectionChanged(ISelection selection) { |
114 |
public void selectionChanged(ISelection selection) { |
Lines 111-116
Link Here
|
111 |
public PasteAction() { |
120 |
public PasteAction() { |
112 |
super(ActionFactory.PASTE.getId()); |
121 |
super(ActionFactory.PASTE.getId()); |
113 |
setText(PDEUIMessages.EditorActions_paste); |
122 |
setText(PDEUIMessages.EditorActions_paste); |
|
|
123 |
setImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); |
124 |
setDisabledImageDescriptor(getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); |
125 |
setActionDefinitionId("org.eclipse.ui.edit.paste"); //$NON-NLS-1$ |
114 |
} |
126 |
} |
115 |
|
127 |
|
116 |
public void selectionChanged(ISelection selection) { |
128 |
public void selectionChanged(ISelection selection) { |
Lines 290-293
Link Here
|
290 |
makeActions(); |
302 |
makeActions(); |
291 |
} |
303 |
} |
292 |
|
304 |
|
|
|
305 |
protected ISharedImages getSharedImages() { |
306 |
if ( fSharedImages == null ) |
307 |
fSharedImages = getPage().getWorkbenchWindow().getWorkbench().getSharedImages(); |
308 |
return fSharedImages; |
309 |
} |
293 |
} |
310 |
} |