Examples of Launch


Examples of org.eclipse.debug.core.Launch

            ILaunchConfiguration newConf = workingCopy.doSave();
            ILaunch l = launch;
            if (mode != null) {
                String launchMode = launch.getLaunchMode();
                if (!mode.equals(launchMode)) {
                    l = new Launch(newConf, mode, launch.getSourceLocator());
                }
            }
            RestartLaunchAction.relaunch(l, newConf);
        } catch (CoreException e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.eclipse.debug.core.Launch

      }
    }
    ISourceLocator srcLocator = new JavaSourceLocator(
        javaProjects.toArray(new IJavaProject[javaProjects.size()]), true);

    ILaunch launch = new Launch(config, ILaunchManager.DEBUG_MODE, srcLocator);
    IProgressMonitor monitor = null;
    Map<String, String> args = new HashMap<String, String>();
    args.put(KEY_HOSTNAME, host);
    args.put(KEY_PORT, String.valueOf(port));

    SocketAttachConnector connector = new SocketAttachConnector();
    try {
      connector.connect(args, monitor, launch);
    } catch (CoreException e) {
      throw new RuntimeException(
          "Debug VM not available at " + host + ":" + port + ". " +
          "Check hostname and port number.");
    }

    this.debugTarget = launch.getDebugTarget();
  }
View Full Code Here

Examples of org.eclipse.debug.core.Launch

     
      VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(
          "org.apache.cayenne.modeler.Main", classpath);
      vmConfig.setProgramArguments(new String[]{file.makeAbsolute().toString()});
     
      Launch launch = new Launch(null, ILaunchManager.RUN_MODE, null);
      IVMRunner vmRunner = JavaRuntime.getDefaultVMInstall().getVMRunner(
          ILaunchManager.RUN_MODE);
     
      vmRunner.run(vmConfig, launch, null);
    } catch(Exception ex){
View Full Code Here

Examples of org.eclipse.debug.core.Launch

  protected CoreException abort_UnsupportedMode(String mode) throws CoreException {
    return fail(LaunchMessages.LCD_errINTERNAL_UnsupportedMode, mode);
  }
 
  protected ILaunch getLaunchForRunMode(ILaunchConfiguration configuration, String mode) throws CoreException {
    return new Launch(configuration, mode, null);
  }
View Full Code Here

Examples of org.eclipse.debug.core.Launch

    }
  }
 
  @Override
  protected ILaunch getLaunchForRunMode(ILaunchConfiguration configuration, String mode) throws CoreException {
    return new Launch(configuration, mode, null);
  }
View Full Code Here

Examples of org.eclipse.debug.core.Launch

        Process process = null;
        Integer[] ports = SocketUtil.findUnusedLocalPorts(2);
        int port = ports[0];
        int clientPort = ports[1];

        final Launch launch = new Launch(createLaunchConfig(), "interactive", //$NON-NLS-1$
                null);
        launch.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, "false"); //$NON-NLS-1$
        launch.setAttribute(INTERACTIVE_LAUNCH_PORT, String.valueOf(port));

        process = new RhinoEclipseProcess(port, clientPort);

        IProcess newProcess = new JSSpawnedInterpreterProcess(launch,
                process, "JS name for UI", null);

        launch.addProcess(newProcess);

        return new JSConsoleLaunchInfo(launch, process, clientPort);
    }
View Full Code Here

Examples of org.eclipse.debug.core.Launch

        this.naturesUsed = naturesUsed;
        Integer[] ports = SocketUtil.findUnusedLocalPorts(2);
        int port = ports[0];
        int clientPort = ports[1];

        final Launch launch = new Launch(createLaunchConfig(), "interactive", null);
        launch.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, "false");
        launch.setAttribute(INTERACTIVE_LAUNCH_PORT, "" + port);

        File scriptWithinPySrc = PydevPlugin.getScriptWithinPySrc("pydevconsole.py");
        Collection<String> extraPath = pythonpath;
        if (InteractiveConsolePrefs.getConsoleConnectVariableView()
                && interpreterManager.getInterpreterType() != IInterpreterManager.INTERPRETER_TYPE_JYTHON_ECLIPSE) {
            // Add PydevDebugPlugin's pysrc so we can access pydevd
            extraPath = new LinkedHashSet<String>();
            extraPath.add(PydevDebugPlugin.getPySrcPath().getAbsolutePath()); //Add this one as the first in the PYTHONPATH!
            extraPath.addAll(pythonpath);
        }
        String pythonpathEnv = SimpleRunner.makePythonPathEnvFromPaths(extraPath);
        String[] commandLine;
        switch (interpreterManager.getInterpreterType()) {

            case IInterpreterManager.INTERPRETER_TYPE_PYTHON:
                commandLine = SimplePythonRunner.makeExecutableCommandStr(interpreter.getExecutableOrJar(),
                        scriptWithinPySrc.getAbsolutePath(),
                        new String[] { String.valueOf(port), String.valueOf(clientPort) });
                break;

            case IInterpreterManager.INTERPRETER_TYPE_IRONPYTHON:
                commandLine = SimpleIronpythonRunner.makeExecutableCommandStr(interpreter.getExecutableOrJar(),
                        scriptWithinPySrc.getAbsolutePath(),
                        new String[] { String.valueOf(port), String.valueOf(clientPort) });
                break;

            case IInterpreterManager.INTERPRETER_TYPE_JYTHON:
                String vmArgs = PydevDebugPlugin.getDefault().getPreferenceStore()
                        .getString(PydevConsoleConstants.INTERACTIVE_CONSOLE_VM_ARGS);

                commandLine = SimpleJythonRunner.makeExecutableCommandStrWithVMArgs(interpreter.getExecutableOrJar(),
                        scriptWithinPySrc.getAbsolutePath(), pythonpathEnv, vmArgs, new String[] {
                                String.valueOf(port), String.valueOf(clientPort) });
                break;

            case IInterpreterManager.INTERPRETER_TYPE_JYTHON_ECLIPSE:
                commandLine = null;
                break;

            default:
                throw new RuntimeException(
                        "Expected interpreter manager to be python or jython or iron python related.");
        }

        if (interpreterManager.getInterpreterType() == IInterpreterManager.INTERPRETER_TYPE_JYTHON_ECLIPSE) {
            process = new JythonEclipseProcess(scriptWithinPySrc.getAbsolutePath(), port, clientPort);

        } else {
            String[] env = SimpleRunner.createEnvWithPythonpath(pythonpathEnv, interpreter.getExecutableOrJar(),
                    interpreterManager, nature);
            process = SimpleRunner.createProcess(commandLine, env, null);
        }

        IProcess newProcess = new PydevSpawnedInterpreterProcess(launch, process, interpreter.getNameForUI(), null);

        launch.addProcess(newProcess);

        return new PydevConsoleLaunchInfo(launch, process, clientPort, interpreter, null);
    }
View Full Code Here

Examples of org.eclipse.debug.core.Launch

    assertEquals(reflistener, listener);
  }

  @Test
  public void testRemoveSessionsFor1() {
    ILaunch launch0 = new Launch(null, null, null);
    ILaunch launch1 = new Launch(null, null, null);
    ICoverageSession s0 = new DummySession();
    ICoverageSession s1 = new DummySession();
    manager.addSession(s0, false, launch0);
    manager.addSession(s1, true, launch1);
    listener.clear();
View Full Code Here

Examples of org.eclipse.debug.core.Launch

    assertEquals(reflistener, listener);
  }

  @Test
  public void testRemoveSessionsFor2() {
    ILaunch launch0 = new Launch(null, null, null);
    ILaunch launch1 = new Launch(null, null, null);
    ILaunch launch2 = new Launch(null, null, null);
    ICoverageSession s0 = new DummySession();
    ICoverageSession s1 = new DummySession();
    manager.addSession(s0, false, launch0);
    manager.addSession(s1, true, launch1);
    listener.clear();
View Full Code Here

Examples of org.eclipse.debug.core.Launch

    assertEquals(reflistener, listener);
  }

  @Test
  public void testRemoveSessionsFor3() {
    ILaunch launch0 = new Launch(null, null, null);
    ILaunch launch1 = new Launch(null, null, null);
    ICoverageSession s0 = new DummySession();
    ICoverageSession s1 = new DummySession();
    ICoverageSession s2 = new DummySession();
    manager.addSession(s0, true, launch0);
    manager.addSession(s1, true, launch1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.