當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。