当前位置: 首页>>代码示例>>Java>>正文


Java PlatformUI.createAndRunWorkbench方法代码示例

本文整理汇总了Java中org.eclipse.ui.PlatformUI.createAndRunWorkbench方法的典型用法代码示例。如果您正苦于以下问题:Java PlatformUI.createAndRunWorkbench方法的具体用法?Java PlatformUI.createAndRunWorkbench怎么用?Java PlatformUI.createAndRunWorkbench使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.ui.PlatformUI的用法示例。


在下文中一共展示了PlatformUI.createAndRunWorkbench方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startEclipseUI

import org.eclipse.ui.PlatformUI; //导入方法依赖的package包/类
/**
 * Starts the eclipse UI.
 * @param postWindowOpenRunnable the post window open runnable
 * @return the integer
 */
public Integer startEclipseUI(Runnable postWindowOpenRunnable) {
	
	Integer eclipseReturnValue = IApplication.EXIT_OK;
	Display display = PlatformUI.createDisplay();
	try {
		// --- Returns if visualization was closed ---- 
		int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor(postWindowOpenRunnable));
		if (returnCode == PlatformUI.RETURN_RESTART) {
			eclipseReturnValue = IApplication.EXIT_RESTART;
		} else {
			eclipseReturnValue = IApplication.EXIT_OK;
		}
		
	} finally {
		display.dispose();
		// --- Just in case of the Eclipse UI ---------
		// --- usage or after an update + restart -----
		if (this.getVisualisationPlatform()==ApplicationVisualizationBy.EclipseFramework || eclipseReturnValue==IApplication.EXIT_RESTART) {
			appReturnValue = eclipseReturnValue;
			Application.setQuitJVM(true);
		}
	}		
	return eclipseReturnValue;
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:30,代码来源:PlugInApplication.java

示例2: start

import org.eclipse.ui.PlatformUI; //导入方法依赖的package包/类
@Override
public Object start ( final IApplicationContext context ) throws Exception
{
    Display display = PlatformUI.createDisplay ();
    try
    {
        int returnCode = PlatformUI.createAndRunWorkbench ( display, new ApplicationWorkbenchAdvisor () );
        if ( returnCode == PlatformUI.RETURN_RESTART )
        {
            return IApplication.EXIT_RESTART;
        }
        else
        {
            return IApplication.EXIT_OK;
        }
    }
    finally
    {
        display.dispose ();
    }

}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:23,代码来源:Application.java

示例3: start

import org.eclipse.ui.PlatformUI; //导入方法依赖的package包/类
@Override
public Object start ( final IApplicationContext context ) throws Exception
{
    final Display display = PlatformUI.createDisplay ();
    try
    {
        final int returnCode = PlatformUI.createAndRunWorkbench ( display, new ApplicationWorkbenchAdvisor () );
        if ( returnCode == PlatformUI.RETURN_RESTART )
        {
            return IApplication.EXIT_RESTART;
        }
        else
        {
            return IApplication.EXIT_OK;
        }
    }
    finally
    {
        display.dispose ();
    }

}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:23,代码来源:Application.java

示例4: start

import org.eclipse.ui.PlatformUI; //导入方法依赖的package包/类
public Object start(IApplicationContext context) throws Exception {
	Display display = PlatformUI.createDisplay();
	try {
		int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
		if (returnCode == PlatformUI.RETURN_RESTART)
			return IApplication.EXIT_RESTART;
		else
			return IApplication.EXIT_OK;
	} finally {
		display.dispose();
	}
	
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:14,代码来源:Application.java

示例5: start

import org.eclipse.ui.PlatformUI; //导入方法依赖的package包/类
public Object start(IApplicationContext context) throws Exception {
	Display display = PlatformUI.createDisplay();
	Shell shell = WorkbenchPlugin.getSplashShell(display);

	if (OSValidator.isWindows() && !PreStartActivity.isDevLaunchMode(context.getArguments())) {
		PreStartActivity activity = new PreStartActivity(shell);
		if (ToolProvider.getSystemJavaCompiler() == null) {
			activity.performPreStartActivity();
		} else {
			activity.updateINIOnJDkUpgrade();
		}
	}
	try {
		Object instanceLocationCheck = checkInstanceLocation(shell, context.getArguments());
		if (instanceLocationCheck != null) {
           	WorkbenchPlugin.unsetSplashShell(display);
               context.applicationRunning();
               return instanceLocationCheck;
           }
		int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
		if (returnCode == PlatformUI.RETURN_RESTART)
			return IApplication.EXIT_RESTART;
		else
			return IApplication.EXIT_OK;
	} finally {
		if (display != null) {
			display.dispose();
		}
		Location instanceLoc = Platform.getInstanceLocation();
		if (instanceLoc != null){
			instanceLoc.release();
		}
	}
	
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:36,代码来源:Application.java


注:本文中的org.eclipse.ui.PlatformUI.createAndRunWorkbench方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。