Package org.eclipse.debug.core

Examples of org.eclipse.debug.core.ILaunchConfiguration


        }
       
        private boolean isEclipseLaunch(ILaunch launch)
            throws CoreException
        {
            ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
           
            if (launchConfiguration == null)
                return false;
           
            return "Eclipse Application".equals(launchConfiguration.getType().getName());
        }
View Full Code Here


                        if (!runningLaunches.contains(launch))
                            continue;
                       
                        runningLaunches.remove(launch);
                       
                        ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
                       
                        for (IEclipseLaunchListener listener : listeners)
                        {
                            listener.launchEnded(launch, launchConfiguration);
                        }
View Full Code Here

                        if (!runningLaunches.contains(launch))
                            continue;
                       
                        runningLaunches.remove(launch);
                       
                        ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
                       
                        for (IEclipseLaunchListener listener : listeners)
                        {
                            listener.launchEnded(launch, launchConfiguration);
                        }
View Full Code Here

    }
  }

  @Override
  public void run(IAction action) {
    final ILaunchConfiguration lastLaunch = view.getLastLaunchConfiguration();
    if (lastLaunch != null) {
      try {
        //Launch configuration launch tend to be called outside of GUI
        //thread, there is not reason to make this call GUI-safe.
        //
        //Both initialization and validation are now inside launch
        //configuration.
        lastLaunch.launch(ILaunchManager.RUN_MODE, null);
      } catch (CoreException e) {
        logger.log(Level.SEVERE, "", e);
      }
    }
  }
View Full Code Here

      logger.log(Level.SEVERE, "", e);
    }
  }

  private void runTests(String projectName, List<String> testCases) throws CoreException {
    ILaunchConfiguration launchConfiguration = getExistingJstdLaunchConfiguration(projectName);
    if (launchConfiguration == null) {
      runFromNewLaunchConfiguration(projectName, testCases);
    } else {
      runFromExistingLaunchConfiguration(launchConfiguration, testCases);
    }
View Full Code Here

  private void runFromExistingLaunchConfiguration(
      ILaunchConfiguration launchConfiguration, final List<String> testCases) throws CoreException {
    final ILaunchConfigurationWorkingCopy workingCopy =
        launchConfiguration.copy("new run").getWorkingCopy();
    workingCopy.setAttribute(TESTS_TO_RUN, testCases);
    final ILaunchConfiguration configuration = workingCopy.doSave();

    Job job = new EclipseTestRunnerJob(configuration, testCases, ServiceLocator.getService(
        JstdTestRunner.class), ServiceLocator.getExtensionPoints(
        ILaunchValidator.class, ILaunchValidator.class.getName()));
    job.schedule();
View Full Code Here

  public void resourceChanged(IResourceChangeEvent event) {
    try {
      ProjectFindingDeltaVisitor visitor = new ProjectFindingDeltaVisitor();
      event.getDelta().accept(visitor);
      String projectName = visitor.getProjectName();
      ILaunchConfiguration launchConfiguration =
          configurationHelper.getLaunchConfiguration(projectName);
      if (launchConfiguration != null) {
        ILaunchConfigurationWorkingCopy workingCopy = launchConfiguration.getWorkingCopy();
        workingCopy.setAttribute(LaunchConfigurationConstants.RUN_ON_EVERY_SAVE, true);
        workingCopy.launch(ILaunchManager.RUN_MODE, null);
        Display.getDefault().asyncExec(new Runnable() {

            @Override
View Full Code Here

    try {
      ILaunchConfiguration[] matchingConfigs =
          DebugPlugin.getDefault().getLaunchManager()
              .getLaunchConfigurations(launchConfigType);
      ILaunchConfiguration launchConfig = null;

      // TODO(jz) allow choosing correct config, for now we're always
      // going to use the first
      if (matchingConfigs.length == 1) {
        launchConfig = matchingConfigs[0];
      } else {
        launchConfig =
            launchConfigType
                .newInstance(null, DebugPlugin.getDefault()
                    .getLaunchManager()
                    .generateUniqueLaunchConfigurationNameFrom(
                        "Run Hadoop Jar"));
      }

      ILaunchConfigurationWorkingCopy copy =
          launchConfig
              .copy("Run " + jar.getName() + " on " + this.getName());

      // COMMENTED(jz) - perform the jarring in the launch delegate now
      // copy.setAttribute("hadoop.jar",
      // jar.buildJar(monitor).toString());

      copy.setAttribute("hadoop.jarrable", jar.toMemento());
      copy.setAttribute("hadoop.host", this.getEffectiveHostName());
      copy.setAttribute("hadoop.user", this.getUserName());
      copy.setAttribute("hadoop.serverid", this.id);
      copy.setAttribute("hadoop.path", this.getInstallPath());
      ILaunchConfiguration saved = copy.doSave();

      // NOTE(jz) became deprecated in 3.3, replaced with getDelegates
      // (plural) method,
      // as this new method is marked experimental leaving as-is for now
      ILaunchConfigurationDelegate delegate =
View Full Code Here

            if (!fTrackedLaunches.contains(launch))
            {
                return;
            }

            ILaunchConfiguration config = launch.getLaunchConfiguration();
            if (config == null)
            {
                return;
            }
View Full Code Here

    }

    private void performLaunch(File element, String mode) throws InterruptedException, CoreException
    {
        ILaunchConfigurationWorkingCopy temparary = createLaunchConfiguration(element);
        ILaunchConfiguration config = temparary.doSave();
        //    if (config == null) {
        // no existing found: create a new one
        //      config=
        //    }
        DebugUITools.launch(config, mode);
View Full Code Here

TOP

Related Classes of org.eclipse.debug.core.ILaunchConfiguration

Copyright © 2018 www.massapicom. 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.