本文整理汇总了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;
}
示例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 ();
}
}
示例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 ();
}
}
示例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();
}
}
示例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();
}
}
}