Package org.eclipse.debug.core

Examples of org.eclipse.debug.core.ILaunchConfiguration


        {
            // Prompt the user to choose a config. A null result means the user
            // cancelled the dialog, in which case this method returns null,
            // since cancelling the dialog should also cancel launching
            // anything.
            ILaunchConfiguration config = chooseConfiguration(candidateConfigs, mode);
            if (config != null)
            {
                return config;
            }
        }
View Full Code Here


        String[] attributeToCompare = getAttributeNamesToCompare();

        ArrayList candidateConfigs = new ArrayList(configs.length);
        for (int i = 0; i < configs.length; i++)
        {
            ILaunchConfiguration config = configs[i];
            if (hasSameAttributes(config, temporary, attributeToCompare))
            {
                candidateConfigs.add(config);
            }
        }
View Full Code Here

        copy.setAttribute(RutaLaunchConstants.INPUT_FOLDER, inputDirPath);
        // do not use RutaLaunchConstants.ARG_OUTPUT_FOLDER here
        copy.setAttribute(RutaLaunchConstants.OUTPUT_FOLDER, outputDirPath);
        copy.setAttribute(RutaLaunchConstants.ARG_DESCRIPTOR, descriptorAbsolutePath);
        copy.setAttribute(RutaLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());
        ILaunchConfiguration lc = copy.doSave();

        String mode = ILaunchManager.RUN_MODE;
        ILaunch launch = new Launch(lc, mode, null);

        ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();

        ILaunch launched = launchConfiguration.launch(ILaunchManager.RUN_MODE, monitor);

        while (!launched.isTerminated()) {
          try {
            Thread.sleep(100);
          } catch (InterruptedException e) {
View Full Code Here

                throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Bnd launch target was not specified or does not exist.", null));

            int processCount = 0;
            for (ILaunch l : DebugPlugin.getDefault().getLaunchManager().getLaunches()) {
                // ... is it the same launch resource?
                ILaunchConfiguration launchConfig = l.getLaunchConfiguration();
                if (launchConfig == null) {
                    continue;
                }
                if (launchResource.equals(LaunchUtils.getTargetResource(launchConfig))) {
                    // Iterate existing processes
View Full Code Here

            // Indicating that we don't want any console to show up
            workingCopy.setAttribute( DebugPlugin.ATTR_CAPTURE_OUTPUT, false );

            // Saving the launch configuration
            ILaunchConfiguration configuration = workingCopy.doSave();

            // Launching the launch configuration
            launch = configuration.launch( ILaunchManager.RUN_MODE, new NullProgressMonitor() );
        }
        catch ( CoreException e )
        {
            ApacheDsPluginUtils.reportError( Messages.getString( "LaunchServerJob.ErrorLaunching" ) + e.getMessage() ); //$NON-NLS-1$
        }
View Full Code Here

    }
   
    private String[] createCommandLine(ILaunch launch)
        throws CoreException
    {  
        ILaunchConfiguration configuration = launch.getLaunchConfiguration();
       
        String perlParams =
            configuration.getAttribute(
                PerlLaunchConfigurationConstants.ATTR_PERL_PARAMETERS,
                "");
        perlParams = VariablesPlugin.getDefault().getStringVariableManager()
            .performStringSubstitution(perlParams);

        String progParams =
            configuration.getAttribute(
                PerlLaunchConfigurationConstants.ATTR_PROGRAM_PARAMETERS,
                "");
        progParams = VariablesPlugin.getDefault().getStringVariableManager()
            .performStringSubstitution(progParams);

        boolean consoleOutput = configuration.getAttribute(
            IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, true);       
   
        List fCmdList = PerlExecutableUtilities.getPerlCommandLine(
            PerlCore.create(getProject(launch)));
   
View Full Code Here

    return null;
  }
 
 
  protected void launch(IResource resource, String mode) {
    ILaunchConfiguration config = findLaunchConfiguration(resource, getConfigurationType());
    if (config != null) {
      DebugUITools.launch(config, mode);
    }
  }
View Full Code Here

    try {
      ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().
          getLaunchConfigurations(configType);
      candidateConfigs = new ArrayList<ILaunchConfiguration>(configs.length);
      for (int i = 0; i < configs.length; i++) {
        ILaunchConfiguration config = configs[i];
        String attrProgramPath = config.getAttribute(LaunchConstants.ATTR_PROGRAM_PATH, "");
        String attrProjectName = config.getAttribute(LaunchConstants.ATTR_PROJECT_NAME, "");
       
        if (attrProgramPath.equals(launchable.getProjectRelativePath().toString())
              && attrProjectName.equals(launchable.getProject().getName())) {
          candidateConfigs.add(config);
        }
      }
    } catch (CoreException ce) {
      LangUIPlugin.logStatus(ce);
    }
   
    int candidateCount = candidateConfigs.size();
    if (candidateCount == 0) {
      return createConfiguration(launchable);
    } else if (candidateCount == 1) {
      return (ILaunchConfiguration) candidateConfigs.get(0);
    } else {
      ILaunchConfiguration config = chooseConfiguration(candidateConfigs);
      if (config != null) {
        return config;
      }
    }
   
View Full Code Here

   
    return null;
  }
 
  protected ILaunchConfiguration createConfiguration(IResource launchable) {
    ILaunchConfiguration config = null;
    ILaunchConfigurationWorkingCopy wc = null;
    try {
      ILaunchConfigurationType configType = getConfigurationType();
      String suggestedName = launchable.getProject().getName();
      String launchName = getLaunchManager().generateLaunchConfigurationName(suggestedName);
View Full Code Here

    }

    @Override
    protected void launch(FileOrResource[] resource, String mode) {

        ILaunchConfiguration conf = null;
        List<ILaunchConfiguration> configurations = super
                        .findExistingLaunchConfigurations(resource);
        if (configurations.isEmpty()) {
            FileOrResource fileOrResource = resource[0];
            if (fileOrResource.resource != null) {
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.