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


Java IApplicationContext类代码示例

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


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

示例1: start

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

示例2: start

import org.eclipse.equinox.app.IApplicationContext; //导入依赖的package包/类
@Override
public Object start ( final IApplicationContext context ) throws Exception
{
    final String[] args = (String[])context.getArguments ().get ( IApplicationContext.APPLICATION_ARGS );
    if ( args == null )
    {
        return null;
    }

    for ( final String uri : args )
    {
        new SystemRunner ().process ( URI.createURI ( uri ), URI.createURI ( uri + ".eswm" ), new NullProgressMonitor () );
    }

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

示例3: start

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

    final Collection<Future<?>> tasks = new LinkedList<Future<?>> ();
    tasks.add ( this.executor.submit ( new ConnectionRunner ( "hd:net://localhost:1402", "h.1" ) ) );
    tasks.add ( this.executor.submit ( new ConnectionRunner ( "da:net://localhost:1402", "h.1" ) ) );
    tasks.add ( this.executor.submit ( new ConnectionRunner ( "hd:net://localhost:1402", "h.1" ) ) );
    tasks.add ( this.executor.submit ( new ConnectionRunner ( "hd:net://localhost:1402", "h.1" ) ) );

    for ( final Future<?> task : tasks )
    {
        task.get ();
    }

    this.executor.shutdown ();

    dumpPerformanData ();

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

示例4: start

import org.eclipse.equinox.app.IApplicationContext; //导入依赖的package包/类
@Override
public Object start(IApplicationContext context) {
    try {
        return Main.main(Platform.getApplicationArgs()) ? EXIT_OK : EXIT_ERROR;
    }   catch (Exception e) {
        e.printStackTrace(System.err);
        Status error = new Status(IStatus.ERROR, ApgdiffConsts.APGDIFF_PLUGIN_ID,
                "pgCodeKeeper error", e);
        Platform.getLog(Activator.getContext().getBundle()).log(error);
        return EXIT_ERROR;
    } finally {
        // only needed when org.apache.felix.gogo.shell bundle is present
        /*try {
            // see bug #514338
            Thread.sleep(110);
        } catch (InterruptedException ex) {
            // no action
        }*/
    }
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:21,代码来源:ApplicationStandalone.java

示例5: start

import org.eclipse.equinox.app.IApplicationContext; //导入依赖的package包/类
@Override
public Object start(IApplicationContext ctxt) throws Exception {
	Activator.log(IStatus.INFO, "Starting VerveineC");

	String[] appArgs = (String[])ctxt.getArguments().get(IApplicationContext.APPLICATION_ARGS);

	VerveineCParser verveine = new VerveineCParser();

	verveine.setOptions(appArgs);
	if (verveine.parse()) {
		verveine.emitMSE();
	}
	else {
		Activator.log(IStatus.ERROR, "Error in model creation, aborting");
	}
	return null;
}
 
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:18,代码来源:PluginApplication.java

示例6: start

import org.eclipse.equinox.app.IApplicationContext; //导入依赖的package包/类
@Override
public Object start(final IApplicationContext context) throws Exception {
	Object o = context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
	Display.getDefault();
	if (o != null && o instanceof String[]) {
		String[] args = (String[]) o;
		for (int i = 0; i < args.length; i++) {
			if (args[i].equals(DESTINATION_ARG)) {
				m_directory = new File(args[i + 1]);
			} else if (args[i].equals(CATEGORY_ARG)) {
				m_catPath = args[i + 1];
			} else if (args[i].equals(PLUGIN_ARG)) {
				m_pluginIds.add(args[i + 1]);
			} else if (args[i].equals(INCLUDE_DEPRECATED_ARG)) {
				m_includeDeprecated = true;
			} else if (args[i].equals("-help")) {
				printUsage();
				return EXIT_OK;
			}
		}
	}

	if (m_directory == null) {
		System.err.println("No output directory specified");
		printUsage();
		return 1;
	} else if (!m_directory.exists() && !m_directory.mkdirs()) {
		System.err.println("Could not create output directory '" + m_directory.getAbsolutePath() + "'.");
		return 1;
	}

	generate();

	return EXIT_OK;
}
 
开发者ID:qqilihq,项目名称:knime-json-node-doc-generator,代码行数:36,代码来源:JsonNodeDocuGenerator.java

示例7: start

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

示例8: openProjects

import org.eclipse.equinox.app.IApplicationContext; //导入依赖的package包/类
@Override
public Object openProjects(Display display, IApplicationContext context, Map<String, Object> parameters) {
    IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects(IContainer.INCLUDE_HIDDEN);
    if (allProjects != null && allProjects.length > 0)
        return null;

    try {
        IProject[] initialProjects = createProjects();

        // put project into parameters map as requested by API to make it available to other extension points
        parameters.put(PROJECTS, initialProjects);
        return null;
    } catch (IOException | CoreException e) {
        log.log(Level.SEVERE, "Could not create default projects", e);
    }
    return null;
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:18,代码来源:DefaultYamcsStudioProject.java

示例9: start

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

示例10: start

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

示例11: start

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

示例12: start

import org.eclipse.equinox.app.IApplicationContext; //导入依赖的package包/类
@Override
public Object start(IApplicationContext context) throws Exception 
{
	String[] args = (String[])context.getArguments().get("application.args");
	System.out.println("Arguments:");
	for(String arg: args)
		System.out.println("\t" + arg);
	
	ClientProxy proxy;
	if (args.length == 1)
		proxy = new ClientProxy(args[0]);
	else
		proxy = new ClientProxy();
	
	try
	{
		proxy.Run();
	}
	catch(IOException e)
	{
		e.printStackTrace();
	}
			
	return null;
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:26,代码来源:Start.java

示例13: start

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

示例14: start

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

示例15: start

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


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