Examples of ILaunchConfigurationWorkingCopy


Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

        // Create the launch configuration, whether the project exists
        // or not, as there may
        // not be a local project associated with the deployed app
        ILaunchConfiguration configuration = launchConfigType.newInstance(project, launchName);
        ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();

        if (project != null && project.isAccessible()) {
          wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());

        }

        // Convert all to String to make it consistent when reading the
        // attributes later.
        wc.setAttribute(CloudFoundryDebuggingLaunchConfigDelegate.HOST_NAME, host);
        wc.setAttribute(CloudFoundryDebuggingLaunchConfigDelegate.PORT, port + ""); //$NON-NLS-1$
        wc.setAttribute(CloudFoundryDebuggingLaunchConfigDelegate.TIME_OUT, timeout + ""); //$NON-NLS-1$
        wc.setAttribute(CloudFoundryDebuggingLaunchConfigDelegate.DEBUGGER_CONNECTION_ID,
            getDebuggerConnectionIdentifier());
        configuration = wc.doSave();

        DebugUITools.setLaunchPerspective(launchConfigType, ILaunchManager.DEBUG_MODE,
            IDebugUIConstants.ID_DEBUG_PERSPECTIVE);

        return configuration;
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

    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(
        IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type
            .getJavaProject().getElementName());
    workingCopy.setMappedResources(new IResource[] { type
        .getUnderlyingResource() });
    return workingCopy.doSave();
  }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

      if (!file.exists()) {
            Logger.debugMSG("File does not exist, cannot create launch configuration: " + file.toString());
            return null;
        }
       
        ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, project.getName());
        String debuggerID = PHPProjectPreferences.getDefaultDebuggerID(project);
        String URL = server.getBaseURL() + "/app_dev.php";
        AbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry.getDebuggerConfiguration(debuggerID);
       
        wc.setAttribute(PHPDebugCorePreferenceNames.PHP_DEBUGGER_ID, debuggerID);
        wc.setAttribute(PHPDebugCorePreferenceNames.CONFIGURATION_DELEGATE_CLASS, debuggerConfiguration.getWebLaunchDelegateClass());
        wc.setAttribute(Server.NAME, server.getName());
        wc.setAttribute(Server.FILE_NAME, file.getFullPath().toOSString());
        wc.setAttribute(IPHPDebugConstants.RUN_WITH_DEBUG_INFO, PHPDebugPlugin.getDebugInfoOption());
        wc.setAttribute(IPHPDebugConstants.OPEN_IN_BROWSER, PHPDebugPlugin.getOpenInBrowserOption());
        wc.setAttribute(IDebugParametersKeys.FIRST_LINE_BREAKPOINT, false);
        wc.setAttribute(Server.BASE_URL, URL);
        wc.setAttribute("auto_generated_url", false);
       
        return wc.doSave();
    }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

    super.buildFinished(project);
    ILaunchConfiguration launchConfiguration =
        configurationHelper.getLaunchConfiguration(project.getElementName());
    if (launchConfiguration != null) {
      try {
        ILaunchConfigurationWorkingCopy workingCopy = launchConfiguration.getWorkingCopy();
        workingCopy.setAttribute(
            TestabilityConstants.CONFIGURATION_ATTR_RUNNING_IN_COMPILATION_MODE, true);
        ILaunch launch = workingCopy.launch(TestabilityConstants.TESTABILITY_MODE, null);
      } catch (CoreException e) {
        logger.logException(e);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

            }
        }
        // try and make one
        final ILaunchConfigurationType launchConfigurationType = launchManager
                .getLaunchConfigurationType(IErlangLaunchDelegateConstants.CONFIGURATION_TYPE);
        ILaunchConfigurationWorkingCopy wc = null;
        wc = launchConfigurationType.newInstance(null, name);
        wc.setAttribute(ErlRuntimeAttributes.PROJECTS,
                ListsUtils.packList(projectNames, PROJECT_NAME_SEPARATOR));
        wc.setAttribute(ErlRuntimeAttributes.RUNTIME_NAME, projects.iterator().next()
                .getRuntimeInfo().getName());
        wc.setAttribute(ErlRuntimeAttributes.NODE_NAME, name);
        wc.setAttribute(ErlRuntimeAttributes.USE_LONG_NAME,
                !HostnameUtils.canUseShortNames()); // prefer short names
        wc.setAttribute(ErlRuntimeAttributes.CONSOLE, true);
        wc.setAttribute(ErlRuntimeAttributes.INTERNAL, false);
        wc.setAttribute(ErlRuntimeAttributes.LOAD_ALL_NODES, false);
        wc.setAttribute(ErlRuntimeAttributes.COOKIE, "erlide");
        final Map<String, String> map = Maps.newHashMap();
        wc.setAttribute("org.eclipse.debug.core.environmentVariables", map);
        if ("debug".equals(mode)) {
            final List<String> moduleNames = getProjectAndModuleNames(projects);
            wc.setAttribute(ErlRuntimeAttributes.DEBUG_INTERPRET_MODULES, moduleNames);
        }
        wc.setMappedResources(getProjectResources(projects));
        return wc.doSave();
    }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

    private ILaunchConfiguration addInterpretedModules(
            final Collection<IErlProject> projects,
            final ILaunchConfiguration launchConfiguration) throws CoreException {
        final List<String> moduleNames = getProjectAndModuleNames(projects);
        final ILaunchConfigurationWorkingCopy wc = launchConfiguration.getWorkingCopy();
        wc.setAttribute(ErlRuntimeAttributes.DEBUG_INTERPRET_MODULES, moduleNames);
        return wc.doSave();
    }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

        final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
        final ILaunchConfigurationType type = launchManager
                .getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE);

        try {
            final ILaunchConfigurationWorkingCopy launchConfig = type.newInstance(null,
                    launchManager.generateLaunchConfigurationName("erlTool"));
            launchConfig.setAttribute(IExternalToolConstants.ATTR_LOCATION, cmd);
            launchConfig.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, args);
            launchConfig
                    .setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, wdir);
            launchConfig.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND,
                    true);
            launchConfig.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);

            final ILaunch myLaunch = launchConfig.launch(ILaunchManager.RUN_MODE,
                    new NullProgressMonitor(), false, false);

            final ToolResults result = new ToolResults();
            if (myLaunch.getProcesses().length == 0) {
                ErlLogger.error("Tool process was not created?!");
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

    public ILaunchConfiguration asLaunchConfiguration() {
        final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
        final ILaunchConfigurationType type = manager
                .getLaunchConfigurationType(IErlangLaunchDelegateConstants.CONFIGURATION_TYPE_INTERNAL);
        ILaunchConfigurationWorkingCopy workingCopy;
        try {
            final RuntimeInfo info = getRuntimeInfo();
            final String name = getNodeName();
            workingCopy = type.newInstance(null, name);
            if (info.getVersion().isReleaseCompatible(new RuntimeVersion(17))) {
                workingCopy.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING,
                        Charsets.UTF_8.name());
            } else {
                workingCopy.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING,
                        Charsets.ISO_8859_1.name());
            }

            workingCopy.setAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID,
                    "org.erlide.backend.ertsProcessFactory");

            workingCopy.setAttribute(ErlRuntimeAttributes.NODE_NAME, getNodeName());
            workingCopy.setAttribute(ErlRuntimeAttributes.RUNTIME_NAME, info.getName());
            workingCopy.setAttribute(ErlRuntimeAttributes.COOKIE, getCookie());
            // workingCopy.setAttribute(ErlLaunchAttributes.CONSOLE,
            // !options.contains(BackendOptions.NO_CONSOLE));
            workingCopy.setAttribute(ErlRuntimeAttributes.USE_LONG_NAME, hasLongName());
            workingCopy.setAttribute(ErlRuntimeAttributes.INTERNAL, isInternal());

            return workingCopy;
        } catch (final CoreException e) {
            ErlLogger.error(e);
            return null;
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

                    .getDefault()
                    .getLaunchManager()
                    .getLaunchConfigurationType(
                            "org.erlide.runtime.debug.launchDebugTrace");
            final String name = target.toString();
            final ILaunchConfigurationWorkingCopy wc = lcType.newInstance(null, name);
            final Set<String> modes = new HashSet<String>();
            modes.add(ILaunchManager.DEBUG_MODE);
            final ILaunchDelegate[] delegates = lcType.getDelegates(modes);
            final ILaunchConfigurationDelegate delegate = delegates[0].getDelegate();
            if (!(delegate instanceof DebugTraceLaunchConfigurationDelegate)) {
                return;
            }
            final DebugTraceLaunchConfigurationDelegate ldtlcd = (DebugTraceLaunchConfigurationDelegate) delegate;
            ldtlcd.setInfo(target.getLaunch(), target,
                    debuggerTraceView.getEventsForLaunch(target));
            wc.launch(ILaunchManager.DEBUG_MODE, null);
        } catch (final CoreException e) {
            ErlLogger.error(e);
        }
    }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy

  private ILaunchConfiguration launch(String configName, String projectName,
      String typeName, String mode) throws CoreException {
    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType type = manager
        .getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
    ILaunchConfigurationWorkingCopy copy = type.newInstance(null, configName);
    copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
        projectName);
    copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
        typeName);
    ILaunchConfiguration config = copy.doSave();
    config.launch(mode, null, true);
    return config;
  }
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.