googleapplication.java

来自「java实 现的 GOOGLE 搜索很好用?」· Java 代码 · 共 31 行

JAVA
31
字号
/*
 * Created on 2004-9-10
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.xqtu.google;

/**
 * @author limeiyong
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
import org.eclipse.core.runtime.IPlatformRunnable;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.application.WorkbenchAdvisor;
public class GoogleApplication implements IPlatformRunnable {
    public Object run(Object args) throws Exception {
        WorkbenchAdvisor workbenchAdvisor = new GoogleWorkbenchAdvisor();
        Display display = PlatformUI.createDisplay();
        int returnCode = PlatformUI.createAndRunWorkbench(display,
                      workbenchAdvisor);
        if (returnCode == PlatformUI.RETURN_RESTART) {
                return IPlatformRunnable.EXIT_RESTART;
        } else {
                return IPlatformRunnable.EXIT_OK;
        }
    }
}

⌨️ 快捷键说明

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