copyaction.java
来自「<Apress.The.Definitive.Guide.to.SWT.a」· Java 代码 · 共 28 行
JAVA
28 行
package examples.ch18.perledit.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import examples.ch18.perledit.PerlEditor;
/**
* This action copies the current selection to the clipboard
*/
public class CopyAction extends Action {
/**
* CopyAction constructor
*/
public CopyAction() {
super("&Copy@Ctrl+C", ImageDescriptor.createFromFile(CopyAction.class,
"/images/copy.gif"));
setToolTipText("Copy");
}
/**
* Runs the action
*/
public void run() {
PerlEditor.getApp().copy();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?