pimrunnable.java

来自「Eclipse RCP下编写的工作管理软件代码」· Java 代码 · 共 29 行

JAVA
29
字号
package net.sf.pim.plugin.rcp;

import org.eclipse.core.runtime.IPlatformRunnable;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;

/**
 * RCP 应用的入口点
 * @author levin
 *
 */
public class PIMRunnable implements IPlatformRunnable {

	public Object run(Object args) throws Exception {
		Display display = PlatformUI.createDisplay();
		try {
			int code = PlatformUI.createAndRunWorkbench(display,
					new PIMWorkbenchAdvisor());
			return code == PlatformUI.RETURN_RESTART
					? EXIT_RESTART
					: EXIT_OK;
		} finally {
			if (display != null)
				display.dispose();
		}
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?