|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2003, 2012 IBM Corporation and others. |
2 |
* Copyright (c) 2003, 2014 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 10-17
Link Here
|
| 10 |
* Joern Dinkla <devnull@dinkla.com> - bug 197821 |
10 |
* Joern Dinkla <devnull@dinkla.com> - bug 197821 |
| 11 |
*******************************************************************************/ |
11 |
*******************************************************************************/ |
| 12 |
package org.eclipse.pde.internal.ui.editor; |
12 |
package org.eclipse.pde.internal.ui.editor; |
| 13 |
|
|
|
| 14 |
import org.eclipse.jface.action.Action; |
| 15 |
|
13 |
|
| 16 |
import java.util.Hashtable; |
14 |
import java.util.Hashtable; |
| 17 |
import org.eclipse.jface.action.*; |
15 |
import org.eclipse.jface.action.*; |
|
Lines 42-47
Link Here
|
| 42 |
private ClipboardAction fCopyAction; |
40 |
private ClipboardAction fCopyAction; |
| 43 |
|
41 |
|
| 44 |
private ClipboardAction fPasteAction; |
42 |
private ClipboardAction fPasteAction; |
|
|
43 |
|
| 44 |
private SelectAllAction fSelectAllAction; |
| 45 |
|
45 |
|
| 46 |
private Hashtable<String, Action> fGlobalActions = new Hashtable<String, Action>(); |
46 |
private Hashtable<String, Action> fGlobalActions = new Hashtable<String, Action>(); |
| 47 |
|
47 |
|
|
Lines 123-128
Link Here
|
| 123 |
} |
123 |
} |
| 124 |
} |
124 |
} |
| 125 |
|
125 |
|
|
|
126 |
class SelectAllAction extends ClipboardAction { |
| 127 |
public SelectAllAction() { |
| 128 |
super(ActionFactory.SELECT_ALL.getId()); |
| 129 |
setText(PDEUIMessages.EditorActions_selectall); |
| 130 |
setActionDefinitionId(ActionFactory.SELECT_ALL.getCommandId()); |
| 131 |
setEnabled(true); |
| 132 |
} |
| 133 |
} |
| 134 |
|
| 126 |
class SaveAction extends Action implements IUpdate { |
135 |
class SaveAction extends Action implements IUpdate { |
| 127 |
public SaveAction() { |
136 |
public SaveAction() { |
| 128 |
} |
137 |
} |
|
Lines 168-173
Link Here
|
| 168 |
mng.add(fCutAction); |
177 |
mng.add(fCutAction); |
| 169 |
mng.add(fCopyAction); |
178 |
mng.add(fCopyAction); |
| 170 |
mng.add(fPasteAction); |
179 |
mng.add(fPasteAction); |
|
|
180 |
mng.add(new Separator()); |
| 181 |
mng.add(fSelectAllAction); |
| 171 |
mng.add(new Separator()); |
182 |
mng.add(new Separator()); |
| 172 |
mng.add(fRevertAction); |
183 |
mng.add(fRevertAction); |
| 173 |
} |
184 |
} |
|
Lines 221-226
Link Here
|
| 221 |
fCutAction = new CutAction(); |
232 |
fCutAction = new CutAction(); |
| 222 |
fCopyAction = new CopyAction(); |
233 |
fCopyAction = new CopyAction(); |
| 223 |
fPasteAction = new PasteAction(); |
234 |
fPasteAction = new PasteAction(); |
|
|
235 |
fSelectAllAction = new SelectAllAction(); |
| 224 |
addGlobalAction(ActionFactory.CUT.getId(), fCutAction); |
236 |
addGlobalAction(ActionFactory.CUT.getId(), fCutAction); |
| 225 |
addGlobalAction(ActionFactory.COPY.getId(), fCopyAction); |
237 |
addGlobalAction(ActionFactory.COPY.getId(), fCopyAction); |
| 226 |
addGlobalAction(ActionFactory.PASTE.getId(), fPasteAction); |
238 |
addGlobalAction(ActionFactory.PASTE.getId(), fPasteAction); |
|
Lines 229-235
Link Here
|
| 229 |
addGlobalAction(ActionFactory.UNDO.getId()); |
241 |
addGlobalAction(ActionFactory.UNDO.getId()); |
| 230 |
addGlobalAction(ActionFactory.REDO.getId()); |
242 |
addGlobalAction(ActionFactory.REDO.getId()); |
| 231 |
// select/find |
243 |
// select/find |
| 232 |
addGlobalAction(ActionFactory.SELECT_ALL.getId()); |
244 |
addGlobalAction(ActionFactory.SELECT_ALL.getId(), fSelectAllAction); |
| 233 |
addGlobalAction(ActionFactory.FIND.getId()); |
245 |
addGlobalAction(ActionFactory.FIND.getId()); |
| 234 |
// bookmark |
246 |
// bookmark |
| 235 |
addGlobalAction(IDEActionFactory.BOOKMARK.getId()); |
247 |
addGlobalAction(IDEActionFactory.BOOKMARK.getId()); |