當前位置: 首頁>>代碼示例>>Java>>正文


Java IApplication.EXIT_RESTART屬性代碼示例

本文整理匯總了Java中org.eclipse.equinox.app.IApplication.EXIT_RESTART屬性的典型用法代碼示例。如果您正苦於以下問題:Java IApplication.EXIT_RESTART屬性的具體用法?Java IApplication.EXIT_RESTART怎麽用?Java IApplication.EXIT_RESTART使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.equinox.app.IApplication的用法示例。


在下文中一共展示了IApplication.EXIT_RESTART屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: startEclipseUI

/**
 * 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,代碼行數:29,代碼來源:PlugInApplication.java

示例2: start

@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,代碼行數:22,代碼來源:Application.java

示例3: start

/**
 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext) <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Object start(IApplicationContext context) throws Exception {
  WorkbenchAdvisor workbenchAdvisor = new TriquetrumEditorAdvisor();
  Display display = PlatformUI.createDisplay();
  try {
    int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);
    if (returnCode == PlatformUI.RETURN_RESTART) {
      return IApplication.EXIT_RESTART;
    } else {
      return IApplication.EXIT_OK;
    }
  } finally {
    display.dispose();
  }
}
 
開發者ID:eclipse,項目名稱:triquetrum,代碼行數:19,代碼來源:TriquetrumEditorAdvisor.java

示例4: start

/**
 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Object start(IApplicationContext context) throws Exception {
	WorkbenchAdvisor workbenchAdvisor = new WTSpec4MEditorAdvisor();
	Display display = PlatformUI.createDisplay();
	try {
		int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);
		if (returnCode == PlatformUI.RETURN_RESTART) {
			return IApplication.EXIT_RESTART;
		}
		else {
			return IApplication.EXIT_OK;
		}
	}
	finally {
		display.dispose();
	}
}
 
開發者ID:mondo-project,項目名稱:mondo-demo-wt,代碼行數:22,代碼來源:WTSpec4MEditorAdvisor.java

示例5: start

public Object start(IApplicationContext context) throws Exception
{
	Display display = PlatformUI.createDisplay();
	try
	{
		Logger.info("Application starting", Level.MAIN, this);
		int returnCode = PlatformUI.createAndRunWorkbench(display,
		        new ApplicationWorkbenchAdvisor());
		Logger.info("Workbench exited with code " + returnCode, Level.MAIN,
		        this);
		if (returnCode == PlatformUI.RETURN_RESTART) return IApplication.EXIT_RESTART;
		else return IApplication.EXIT_OK;
	}
	finally
	{
		display.dispose();
	}

}
 
開發者ID:Spacecraft-Code,項目名稱:SPELL,代碼行數:19,代碼來源:Application.java

示例6: start

public Object start(IApplicationContext context) throws Exception {
		Display display = PlatformUI.createDisplay();

//		OntologyEditorView.setMyOntologyTree(new MyOntologyTrees());
		 
		Activator.getDefault().createResource();

		Regex.loadRegex();
		// Activator.getDefault().getResource().setDisplay(this._display);
		// _global = new Global(_i2b2ImportTool, _display);

		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:tmfev,項目名稱:IDRT-Import-and-Mapping-Tool,代碼行數:24,代碼來源:Application.java

示例7: start

@Override
public Object start(final IApplicationContext context) throws Exception {
	Display.setAppName("Gama Platform");
	Display.setAppVersion("1.7.0");
	createProcessor();
	if ( checkWorkspace() == EXIT_OK )
		return EXIT_OK;
	Display display = null;
	try {
		display = Display.getDefault();
		final int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
		if ( returnCode == PlatformUI.RETURN_RESTART ) { return IApplication.EXIT_RESTART; }
		return IApplication.EXIT_OK;
	} finally {
		if ( display != null )
			display.dispose();
		final Location instanceLoc = Platform.getInstanceLocation();
		if ( instanceLoc != null ) {
			instanceLoc.release();
		}
	}

}
 
開發者ID:gama-platform,項目名稱:gama,代碼行數:23,代碼來源:Application.java

示例8: start

/**
 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Object start(IApplicationContext context) throws Exception {
	WorkbenchAdvisor workbenchAdvisor = new DictionaryEditorAdvisor();
	Display display = PlatformUI.createDisplay();
	try {
		int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);
		if (returnCode == PlatformUI.RETURN_RESTART) {
			return IApplication.EXIT_RESTART;
		}
		else {
			return IApplication.EXIT_OK;
		}
	}
	finally {
		display.dispose();
	}
}
 
開發者ID:nasa,項目名稱:OpenSPIFe,代碼行數:22,代碼來源:DictionaryEditorAdvisor.java

示例9: start

public Object start(IApplicationContext context) {
	Display display = PlatformUI.createDisplay();
	try {
		PreferenceUtil.initProductEdition();

		deleteErrorMemoryInfo();

		initSystemLan();
		PreferenceUtil.checkCleanValue();
		int returnCode = PlatformUI.createAndRunWorkbench(display,
				new ApplicationWorkbenchAdvisor());
		if (returnCode == PlatformUI.RETURN_RESTART) {
			return IApplication.EXIT_RESTART;
		}
		return IApplication.EXIT_OK;
	} finally {
		display.dispose();
	}
}
 
開發者ID:heartsome,項目名稱:translationstudio8,代碼行數:19,代碼來源:Application.java

示例10: start

/**
 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Object start(IApplicationContext context) throws Exception {
	WorkbenchAdvisor workbenchAdvisor = new DbchangelogEditorAdvisor();
	Display display = PlatformUI.createDisplay();
	try {
		int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);
		if (returnCode == PlatformUI.RETURN_RESTART) {
			return IApplication.EXIT_RESTART;
		}
		else {
			return IApplication.EXIT_OK;
		}
	}
	finally {
		display.dispose();
	}
}
 
開發者ID:dzonekl,項目名稱:LiquibaseEditor,代碼行數:22,代碼來源:DbchangelogEditorAdvisor.java

示例11: start

/**
 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Object start(IApplicationContext context) throws Exception {
	WorkbenchAdvisor workbenchAdvisor = new OverviewEditorAdvisor();
	Display display = PlatformUI.createDisplay();
	try {
		int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);
		if (returnCode == PlatformUI.RETURN_RESTART) {
			return IApplication.EXIT_RESTART;
		}
		else {
			return IApplication.EXIT_OK;
		}
	}
	finally {
		display.dispose();
	}
}
 
開發者ID:CloudScale-Project,項目名稱:Environment,代碼行數:22,代碼來源:OverviewEditorAdvisor.java

示例12: start

public Object start(IApplicationContext context) {
	Display display = PlatformUI.createDisplay();
	try {
		PreferenceUtil.initProductEdition();
		if (!PreferenceUtil.checkEdition()) {
			MessageDialog.openInformation(display.getActiveShell(), Messages.getString("dialog.AboutDialog.msgTitle"),
					Messages.getString("dialog.AboutDialog.msg"));
			return IApplication.EXIT_OK;
		}
		initSystemLan();
		SystemResourceUtil.beforeload();
		PreferenceUtil.checkCleanValue();
		deleteErrorMemoryFile();
		int returnCode = PlatformUI.createAndRunWorkbench(display,
				new ApplicationWorkbenchAdvisor());
		if (returnCode == PlatformUI.RETURN_RESTART) {
			return IApplication.EXIT_RESTART;
		}
		return IApplication.EXIT_OK;
	} finally {
		display.dispose();
	}
}
 
開發者ID:heartsome,項目名稱:tmxeditor8,代碼行數:23,代碼來源:Application.java

示例13: start

public Object start(IApplicationContext context) {

		Display display = PlatformUI.createDisplay();

		try {
			int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
			if (returnCode == PlatformUI.RETURN_RESTART) {
				return IApplication.EXIT_RESTART;
			}
			return IApplication.EXIT_OK;
		}
		finally {
			display.dispose();
		}

/*		
		new ApplicationWorkbench().createUI();
		return new Integer(0);
*/
	}
 
開發者ID:jaloncad,項目名稱:redmine.rap,代碼行數:20,代碼來源:DeskEntryPoint.java

示例14: start

@Override
public Object start(IApplicationContext context) {

	Display display = PlatformUI.createDisplay();

	try {

		int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
		if (returnCode == PlatformUI.RETURN_RESTART) {
			return IApplication.EXIT_RESTART;
		}			
		return IApplication.EXIT_OK;
	}
	catch (Exception e) {
		e.printStackTrace();
	}
	finally {
		display.dispose();
	}
	return display;
}
 
開發者ID:jaloncad,項目名稱:redmine.rap,代碼行數:21,代碼來源:Application.java

示例15: startWithoutWorkspaceSelection

private Object startWithoutWorkspaceSelection()
{
    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:vobject,項目名稱:maru,代碼行數:18,代碼來源:Application.java


注:本文中的org.eclipse.equinox.app.IApplication.EXIT_RESTART屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。