Package org.eclipse.debug.core

Examples of org.eclipse.debug.core.ILaunchManager


    return config.launch(mode, null);
  }

   private static ILaunchConfigurationWorkingCopy createConfig(String label, IVMInstall vmInstall, String classToLaunch, List<IPath> classpath, String[] bootClasspath, String vmArgs, String prgArgs, boolean debug, boolean showInDebugger, boolean saveConfig) throws CoreException {
    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType launchType = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
   
    ILaunchConfigurationWorkingCopy config = launchType.newInstance(null, label);
    config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, JavaRuntime.newJREContainerPath(vmInstall).toString());
   
    config.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
View Full Code Here


        }
    }

    protected ILaunchConfiguration findLaunchConfig(IPath targetPath) throws CoreException {
        List<ILaunchConfiguration> candidateConfigs = new ArrayList<ILaunchConfiguration>();
        ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();

        ILaunchConfigurationType configType = manager.getLaunchConfigurationType(launchId);
        ILaunchConfiguration[] configs = manager.getLaunchConfigurations(configType);

        for (int i = 0; i < configs.length; i++) {
            ILaunchConfiguration config = configs[i];
            String configTargetName = config.getAttribute(LaunchConstants.ATTR_LAUNCH_TARGET, (String) null);
            if (configTargetName != null && configTargetName.equals(targetPath.toString())) {
View Full Code Here

        // Return the latest (last in the list)
        return !candidateConfigs.isEmpty() ? candidateConfigs.get(candidateConfigs.size() - 1) : null;
    }

    protected ILaunchConfigurationWorkingCopy createConfiguration(IPath targetPath) throws CoreException {
        ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
        ILaunchConfigurationType configType = manager.getLaunchConfigurationType(launchId);

        ILaunchConfigurationWorkingCopy wc;
        wc = configType.newInstance(null, manager.generateUniqueLaunchConfigurationNameFrom(targetPath.lastSegment()));
        wc.setAttribute(LaunchConstants.ATTR_LAUNCH_TARGET, targetPath.toString());
        wc.setAttribute(LaunchConstants.ATTR_CLEAN, LaunchConstants.DEFAULT_CLEAN);
        wc.setAttribute(LaunchConstants.ATTR_DYNAMIC_BUNDLES, LaunchConstants.DEFAULT_DYNAMIC_BUNDLES);

        IResource targetResource = ResourcesPlugin.getWorkspace().getRoot().findMember(targetPath);
View Full Code Here

        IProject project = getProject(selection);
        return project != null ? getLaunchConfigsForProject(project) : null;
    }

    protected ILaunchConfiguration[] getLaunchConfigsForProject(@SuppressWarnings("unused") IProject project) {
        ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();

        ILaunchConfigurationType type = manager.getLaunchConfigurationType(launchId);
        try {
            ILaunchConfiguration[] all = manager.getLaunchConfigurations(type);
            List<ILaunchConfiguration> result = new ArrayList<ILaunchConfiguration>(all.length);

            return result.toArray(new ILaunchConfiguration[result.size()]);
        } catch (CoreException e) {
            logger.logError("Error retrieving launch configurations.", e);
View Full Code Here

  public final void start(final BundleContext bundleContext) throws Exception
  {
    super.start(bundleContext);
    Activator.context = bundleContext;

    ILaunchManager launchMan = DebugPlugin.getDefault().getLaunchManager();

    launchMan.addLaunchListener(launchListener);

    windowListener = createWindowListener();
    PlatformUI.getWorkbench().addWindowListener(windowListener);
  }
View Full Code Here

        }
    }

    protected ILaunchConfiguration findLaunchConfig(IPath targetPath) throws CoreException {
        List<ILaunchConfiguration> candidateConfigs = new ArrayList<ILaunchConfiguration>();
        ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();

        ILaunchConfigurationType configType = manager.getLaunchConfigurationType(launchId);
        ILaunchConfiguration[] configs = manager.getLaunchConfigurations(configType);

        for (int i = 0; i < configs.length; i++) {
            ILaunchConfiguration config = configs[i];
            String configTargetName = config.getAttribute(LaunchConstants.ATTR_LAUNCH_TARGET, (String) null);
            if (configTargetName != null && configTargetName.equals(targetPath.toString())) {
View Full Code Here

        // Return the latest (last in the list)
        return !candidateConfigs.isEmpty() ? candidateConfigs.get(candidateConfigs.size() - 1) : null;
    }

    protected ILaunchConfigurationWorkingCopy createConfiguration(IPath targetPath) throws CoreException {
        ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
        ILaunchConfigurationType configType = manager.getLaunchConfigurationType(launchId);

        ILaunchConfigurationWorkingCopy wc;
        wc = configType.newInstance(null, manager.generateLaunchConfigurationName(targetPath.lastSegment()));
        wc.setAttribute(LaunchConstants.ATTR_LAUNCH_TARGET, targetPath.toString());
        wc.setAttribute(LaunchConstants.ATTR_CLEAN, LaunchConstants.DEFAULT_CLEAN);
        wc.setAttribute(LaunchConstants.ATTR_DYNAMIC_BUNDLES, LaunchConstants.DEFAULT_DYNAMIC_BUNDLES);

        IResource targetResource = ResourcesPlugin.getWorkspace().getRoot().findMember(targetPath);
View Full Code Here

        IProject project = getProject(selection);
        return project != null ? getLaunchConfigsForProject(project) : null;
    }

    protected ILaunchConfiguration[] getLaunchConfigsForProject(@SuppressWarnings("unused") IProject project) {
        ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();

        ILaunchConfigurationType type = manager.getLaunchConfigurationType(launchId);
        try {
            ILaunchConfiguration[] all = manager.getLaunchConfigurations(type);
            List<ILaunchConfiguration> result = new ArrayList<ILaunchConfiguration>(all.length);

            return result.toArray(new ILaunchConfiguration[result.size()]);
        } catch (CoreException e) {
            logger.logError("Error retrieving launch configurations.", e);
View Full Code Here

  }

  protected ILaunchConfiguration createConfiguration(IType type)
      throws CoreException {

    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();

    ILaunchConfigurationType configType = manager
        .getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);

    ILaunchConfigurationWorkingCopy workingCopy = configType.newInstance(
        null, manager.generateLaunchConfigurationName(type
            .getTypeQualifiedName('.')));
    workingCopy.setAttribute(
        IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
        type.getFullyQualifiedName());
    workingCopy.setAttribute(
View Full Code Here

   * @return
   * @throws CoreException
   */
    public static ILaunchConfiguration createLaunchConfiguration(IProject project, Server server, IFile file) throws CoreException {
     
        ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
        ILaunchConfigurationType  configType = lm.getLaunchConfigurationType(IPHPDebugConstants.PHPServerLaunchType);
     
      if (!file.exists()) {
            Logger.debugMSG("File does not exist, cannot create launch configuration: " + file.toString());
            return null;
        }
View Full Code Here

TOP

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

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.