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


Java IApplication类代码示例

本文整理汇总了Java中org.eclipse.equinox.app.IApplication的典型用法代码示例。如果您正苦于以下问题:Java IApplication类的具体用法?Java IApplication怎么用?Java IApplication使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: startEclipseUI

import org.eclipse.equinox.app.IApplication; //导入依赖的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: startSwingMainWindow

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
/**
 * Start swing UI.
 *
 * @param postWindowOpenRunnable the post window open runnable
 * @return the integer
 * @throws Exception the exception
 */
public Integer startSwingMainWindow(Runnable postWindowOpenRunnable) throws Exception {
	
	Integer appReturnValue = IApplication.EXIT_OK;
	if (Application.isOperatingHeadless()==false) {
		this.setSwingMainWindow(new MainWindow());
		Application.getProjectsLoaded().setProjectView();
	}
	// --- Remove splash screen -----------------------
	this.setApplicationIsRunning();
	
	// --- Execute the post window open runnable ------
	if (postWindowOpenRunnable!=null) {
		postWindowOpenRunnable.run();
	}
	
	return appReturnValue;
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:25,代码来源:PlugInApplication.java

示例3: startJadeStandalone

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
/**
 * Just starts JADE without any further visualization.
 *
 * @param arguments the command line arguments for the JADE platform 
 * @return the integer
 */
public Integer startJadeStandalone(String[] arguments) {
	
	// --- Remove splash screen -----------------------
	this.setApplicationIsRunning();
	
	// --- Boot JADE as from command line ------------- 
	jade.Boot.main(arguments);
	jade.core.Runtime.instance().invokeOnTermination(new Runnable() {
		@Override
		public void run() {
			Application.setQuitJVM(true);
		}
	});
	return IApplication.EXIT_OK;
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:22,代码来源:PlugInApplication.java

示例4: start

import org.eclipse.equinox.app.IApplication; //导入依赖的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

示例5: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
@Override
public Object start(IApplicationContext context) throws Exception {

   JavaLanguageServerPlugin.startLanguageServer(this);
   synchronized(waitLock){
         while (!shutdown) {
           try {
             context.applicationRunning();
             JavaLanguageServerPlugin.logInfo("Main thread is waiting");
             waitLock.wait();
           } catch (InterruptedException e) {
             JavaLanguageServerPlugin.logException(e.getMessage(), e);
           }
         }
   }
	return IApplication.EXIT_OK;
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:18,代码来源:LanguageServer.java

示例6: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
/**
 * @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,代码行数:20,代码来源:TriquetrumEditorAdvisor.java

示例7: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
/**
 * @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,代码行数:23,代码来源:WTSpec4MEditorAdvisor.java

示例8: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
@Override
public Object start(IApplicationContext context) throws Exception {
	// We need to test the secure store, so the user will get a warning
	// if they haven't set up a proper password.
	ISecurePreferences factory = SecurePreferencesFactory.getDefault();
	final ISecurePreferences node = factory.node(TEST_NODE);
	node.put(TEST_KEY, "1", true);
	if (!node.isEncrypted(TEST_KEY)) {
		LOGGER.error("Secure store not encrypted: please revise your setup!");
	} else {
		LOGGER.info("Secure store encrypted: setup is OK");
	}
	factory.flush();

	System.out.println("\n"
			+ "Welcome to the MONDO Server!\n"
			+ "List available commands with '" + ServerCommandProvider.MSERVER_HELP_CMD + "'.\n"
			+ "Stop the server with 'shutdown' and then 'close'.\n");

	// We don't really do anything at the moment for the application:
	// we just want a working Equinox instance for now		
	return IApplication.EXIT_OK;
}
 
开发者ID:mondo-project,项目名称:mondo-integration,代码行数:24,代码来源:Application.java

示例9: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
@Override
public Object start(IApplicationContext context) throws Exception {

  String[] args = (String[]) context.getArguments().get(
      IApplicationContext.APPLICATION_ARGS);

  if (args.length < 3) {
    System.err.println("Usage: eclipse -application com.google.gwt.eclipse.core.formatter.GWTCodeFormatterApplication "
        + "<javaFormatterConfigFile> <jsFormatterConfigFile> <sourceFile1> [<sourceFile2>] ...");
    return IApplication.EXIT_OK;
  }

  javaConfig = getConfig(args[0]);
  jsConfig = getConfig(args[1]);

  // The JavaScriptCore plugin, which the JS formatter depends on, requires
  // the workbench, so start one manually
  startWorkbench();

  for (int i = 2; i < args.length; i++) {
    File f = new File(args[i]);
    format(f);
  }

  return IApplication.EXIT_OK;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:27,代码来源:GWTCodeFormatterApplication.java

示例10: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
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,代码行数:20,代码来源:Application.java

示例11: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
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,代码行数:25,代码来源:Application.java

示例12: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
@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,代码行数:24,代码来源:Application.java

示例13: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
@Override
public Object start(IApplicationContext context) throws Exception {
	// We need to test the secure store, so the user will get a warning
	// if they haven't set up a proper password.
	ISecurePreferences factory = SecurePreferencesFactory.getDefault();
	final ISecurePreferences node = factory.node(TEST_NODE);
	node.put(TEST_KEY, "1", true);
	if (!node.isEncrypted(TEST_KEY)) {
		LOGGER.error("Secure store not encrypted: please revise your setup!");
	} else {
		LOGGER.info("Secure store encrypted: setup is OK");
	}
	factory.flush();

	System.out.println("\n"
			+ "Welcome to the Hawk Server!\n"
			+ "List available commands with '" + ServerCommandProvider.HSERVER_HELP_CMD + "'.\n"
			+ "Stop the server with 'shutdown'.\n");

	// We don't really do anything at the moment for the application:
	// we just want a working Equinox instance for now		
	return IApplication.EXIT_OK;
}
 
开发者ID:mondo-project,项目名称:mondo-hawk,代码行数:24,代码来源:Application.java

示例14: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
/**
 * @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,代码行数:23,代码来源:DictionaryEditorAdvisor.java

示例15: start

import org.eclipse.equinox.app.IApplication; //导入依赖的package包/类
public Object start(IApplicationContext context) throws Exception {
	boolean execute = processCommandLine((String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS));
	if (execute) {
		if (this.jarToIndex != null && this.indexFile != null) {
			File f = new File(this.jarToIndex);
			if (f.exists()) {
				if (this.verbose) {
					System.out.println(Messages.bind(Messages.CommandLineProcessing, this.indexFile, this.jarToIndex));
				}
				try {
					JavaIndexer.generateIndexForJar(this.jarToIndex, this.indexFile);
				} catch (IOException e) {
					System.out.println(Messages.bind(Messages.CaughtException, "IOException", e.getLocalizedMessage())); //$NON-NLS-1$
				}
			} else {
					System.out.println(Messages.bind(Messages.CommandLineJarFileNotExist, this.jarToIndex));
			}
		} else if (this.jarToIndex == null) {
			System.out.println(Messages.bind(Messages.CommandLineJarNotSpecified));
		} else if (this.indexFile == null) {
			System.out.println(Messages.bind(Messages.CommandLineIndexFileNotSpecified));
		}
	}
	return IApplication.EXIT_OK;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:26,代码来源:JavaIndexerApplication.java


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