⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 application.java

📁 简单地讲, 一个RCP应用就是一个可独立于Eclispe IDE开发环境运行的Eclipse 插件. 下面我们以一个简单的例子开始我们的RCP旅
💻 JAVA
字号:
package simplebrowser;import org.eclipse.core.runtime.IPlatformRunnable;import org.eclipse.swt.widgets.Display;import org.eclipse.ui.PlatformUI;/** * This class controls all aspects of the application's execution */public class Application implements IPlatformRunnable {	/* (non-Javadoc)	 * @see org.eclipse.core.runtime.IPlatformRunnable#run(java.lang.Object)	 */	public Object run(Object args) throws Exception {		Display display = PlatformUI.createDisplay();		try {			int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());			if (returnCode == PlatformUI.RETURN_RESTART) {				return IPlatformRunnable.EXIT_RESTART;			}			return IPlatformRunnable.EXIT_OK;		} finally {			display.dispose();		}	}}

⌨️ 快捷键说明

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