Examples of ILaunch


Examples of org.eclipse.debug.core.ILaunch

     
    VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(Constants.GWT_COMPILER_CLASS, (String[]) classpath.toArray(new String[classpath.size()]));
    vmConfig.setWorkingDirectory(project.getLocation().toOSString());
    List compilerArgs = Helper.getCompilerArgs(launchConfig);
    vmConfig.setProgramArguments((String[]) compilerArgs.toArray(new String[compilerArgs.size()]));
    final ILaunch compiler = new Launch(null, ILaunchManager.RUN_MODE, null);
   
    DebugPlugin.getDefault().addDebugEventListener(new IDebugEventSetListener() {

      public void handleDebugEvents(DebugEvent[] events) {

        for(int i = 0;i<events.length;i++) {

          DebugEvent event = events[i];
         
                Object source = event.getSource();
                if (source instanceof IProcess && event.getKind() == DebugEvent.TERMINATE) {

                ILaunch launch = ((IProcess) source).getLaunch();
                if (compiler.equals(launch)) {
                  DebugPlugin.getDefault().removeDebugEventListener(this);

              // wakeup the publisher
              synchronized (GwtProject.this) {
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

    ILaunchConfiguration launchConfig = Helper.findOrCreateLaunch(moduleName, projectName, true);
    ILaunchConfigurationWorkingCopy workingCopy = launchConfig.getWorkingCopy();
    workingCopy.setAttribute(Constants.LAUNCH_ATTR_GWT_COMPILE, true);
    // workingCopy.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);
    ILaunch compiler = workingCopy.launch(ILaunchManager.RUN_MODE, null, false, true);
    // launch(launchConfig);

    try {
      synchronized (this) {
        int i = 0;
        while ((!compiler.isTerminated()) && (i < 90)) {
          wait(1000);
          i++;
        }
        // TODO: we throw an exception on timeout?
      }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

    if (_current == null) {
      throw new IllegalStateException("Nothing to terminate.");
    }

    ILaunch launch = _current;
    _current = null;

    DebugEventWaiter waiter = new DebugEventWaiter(DebugEvent.TERMINATE,
        null, IDebugTarget.class);

    launch.getDebugTarget().terminate();

    Assert.assertTrue("Process took too long to terminate. " + //$NON-NLS-1$
        "Remaining tests may not run correctly. ", waiter
        .doWait(TERMINATE_TIMEOUT)); //$NON-NLS-1$

    Assert.assertEquals(launch.getDebugTarget(), waiter.getSource());
  }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

    ILaunchConfiguration launchConfig = Helper.findOrCreateLaunch(moduleName, projectName, true);
    ILaunchConfigurationWorkingCopy workingCopy = launchConfig.getWorkingCopy();
    workingCopy.setAttribute(Constants.LAUNCH_ATTR_GWT_COMPILE, true);
    // workingCopy.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);
    ILaunch compiler = workingCopy.launch(ILaunchManager.RUN_MODE, null, false, true);
    // launch(launchConfig);

    try {
      synchronized (this) {
        int i = 0;
        while ((!compiler.isTerminated()) && (i < 90)) {
          wait(1000);
          i++;
        }
        // TODO: we throw an exception on timeout?
      }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

          ILaunchConfigurationWorkingCopy copy = launchConfiguration
              .copy("A");
          if (!openBrowser) {
            copy.setAttribute("com.google.gwt.eclipse.core.URL", "");
          }
          ILaunch launch = copy.launch("debug", monitor);
               
          for (int a = 0; a < 300; a++) {
            p = DebugServerLaunchManager.getPort(project);
            if (p != -1) {
              result = p;
              break;
            }
            if (launch.isTerminated()) {
              break;
            }
            try {
              Thread.sleep(300);
            } catch (InterruptedException e) {
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

            final IOConsole p = (IOConsole) c;
            Object attribute = p
                .getAttribute("org.eclipse.debug.ui.ATTR_CONSOLE_PROCESS");
            if (attribute != null) {
              IProcess pr = (IProcess) attribute;
              ILaunch launch = pr.getLaunch();
              ILaunchConfiguration launchConfiguration = launch
                  .getLaunchConfiguration();
              Map<?, ?> attributes = null;
              try {
                attributes = launchConfiguration
                    .getAttributes();
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

        {
          break;
        }
        // monitor.worked(step);
        System.out.println("Running ACA with: " + config.getName());
        ILaunch acaRunLaunch = launch(config, ILaunchManager.DEBUG_MODE);
        setActiveLaunch(acaRunLaunch);
        IDebugTarget target = acaRunLaunch.getDebugTarget();
        completedTargets.add((DestecsDebugTarget) target);
        File outputFolder = target == null ? null
            : ((DestecsDebugTarget) target).getOutputFolder();

        while (!acaRunLaunch.isTerminated())
        {
          internalSleep(100);
        }

        if (acaRunLaunch != null && !acaRunLaunch.isTerminated())
        {
          acaRunLaunch.terminate();
        }

        setActiveLaunch(null);

        @SuppressWarnings("unchecked")
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

  {
    if (config != null)
    {
      try
      {
        ILaunch launch = DebugUITools.buildAndLaunch(config, mode, new NullProgressMonitor());
        return launch;
      } catch (CoreException e)
      {
        DestecsDebugPlugin.logError("Failed to launch co simulation as part of ACA.", e);
      }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

  public void stopSimulation()
  {
    try
    {
      ILaunch l = getActiveLaunch();
      if(l != null)
      {
        l.terminate();
      }
      this.interrupt();
    } catch (Exception e)
    {
      DestecsDebugPlugin.logError("Failed to stop ACA Manager.", e);
View Full Code Here

Examples of org.eclipse.debug.core.ILaunch

        protected IStatus run(IProgressMonitor monitor)
        {
          try
          {
            ILaunchConfiguration vdmLaunchConfig = getVdmLaunchConfig(deDebugPort);
            ILaunch vdmLaunch = vdmLaunchConfig.launch("debug", null);
            launch.addDebugTarget(vdmLaunch.getDebugTarget());
          } catch (CoreException e)
          {
            return new Status(IStatus.ERROR, IDebugConstants.PLUGIN_ID, "Faild to launch VDM-RT debug", e);
          }
          return Status.OK_STATUS;
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.