Examples of ILaunchManager


Examples of org.eclipse.debug.core.ILaunchManager

*/
public class TestabilityLaunchConfigurationHelper {
  private Logger logger = new Logger();
  public ILaunchConfiguration getLaunchConfiguration(String projectName) {
    try {
      ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
      ILaunchConfigurationType type = launchManager
          .getLaunchConfigurationType(TestabilityConstants.TESTABILITY_LAUNCH_CONFIGURATION_TYPE);
      ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations(type);
      for (ILaunchConfiguration launchConfiguration : launchConfigurations) {
        String configProjectName =
            launchConfiguration.getAttribute(TestabilityConstants.CONFIGURATION_ATTR_PROJECT_NAME,
                "");
        if (configProjectName.equals(projectName)
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

  }
 
  public boolean isExistingLaunchConfigWithRunOnBuildOtherThanCurrent(
      String projectName, String launchConfigName) {
    try {
      ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
      ILaunchConfigurationType type = launchManager
          .getLaunchConfigurationType(TestabilityConstants.TESTABILITY_LAUNCH_CONFIGURATION_TYPE);
      ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations(type);
      for (ILaunchConfiguration launchConfiguration : launchConfigurations) {
        String configProjectName =
            launchConfiguration.getAttribute(TestabilityConstants.CONFIGURATION_ATTR_PROJECT_NAME,
                "");
        boolean runOnEveryBuild =
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

    @Override
    public synchronized void run() {
        final ILaunch launch = getLaunch();
        if (launch != null) {
            final ILaunchManager launchManager = DebugPlugin.getDefault()
                    .getLaunchManager();
            launchManager.removeLaunch(launch);
            ConsolePlugin.getDefault().getConsoleManager()
                    .removeConsoles(new IConsole[] { fConsole });
            fConsoleView = null;
            fLaunch = null;
        }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

    }

    private ILaunchConfiguration getLaunchConfiguration(
            final Collection<IErlProject> projects, final String mode)
            throws CoreException {
        final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
        final List<String> projectNames = getProjectNames(projects);
        String name = ListsUtils.packList(projectNames, "_");
        if (name.length() > 15) {
            name = ListsUtils.packList(StringUtils.removeCommonPrefixes(projectNames),
                    "_");
        }
        // try and find one
        final ILaunchConfiguration[] launchConfigurations = launchManager
                .getLaunchConfigurations();
        for (final ILaunchConfiguration launchConfiguration : launchConfigurations) {
            if (launchConfiguration.getName().equals(name)) {
                if (mode.equals(ILaunchManager.DEBUG_MODE)) {
                    return addInterpretedModules(projects, launchConfiguration);
                }
                return launchConfiguration;
            }
        }
        // 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));
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

        if (cmd == null) {
            ErlLogger.warn("Tool '" + cmd0 + "' can't be found in $PATH");
            return new ToolResults();
        }

        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,
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

    public void setLaunch(final ILaunch launch) {
        this.launch = launch;
    }

    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();
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

   * @see ILaunchManager#RUN_MODE
   * @see ILaunchManager#DEBUG_MODE
   */
  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,
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

      throw e;
    }
   
  }
  protected static ILaunch launch(IProject proj, String name, String mainClass, String args, String vmargs, String app) throws CoreException
    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
 
    ILaunchConfigurationType type=null;
    if(app.equalsIgnoreCase(CommonNames.START_DERBY_SERVER)){
      //type= manager.getLaunchConfigurationType("org.apache.derby.ui.startDerbyServerLaunchConfigurationType");
      type= manager.getLaunchConfigurationType(CommonNames.START_SERVER_LAUNCH_CONFIG_TYPE);
    }else if(app.equalsIgnoreCase(CommonNames.SHUTDOWN_DERBY_SERVER)){
      //type= manager.getLaunchConfigurationType("org.apache.derby.ui.stopDerbyServerLaunchConfigurationType");
      type= manager.getLaunchConfigurationType(CommonNames.STOP_SERVER_LAUNCH_CONFIG_TYPE);
    }else if(app.equalsIgnoreCase(CommonNames.IJ)){
      //type= manager.getLaunchConfigurationType("org.apache.derby.ui.ijDerbyLaunchConfigurationType");
      type= manager.getLaunchConfigurationType(CommonNames.IJ_LAUNCH_CONFIG_TYPE);
    }else if(app.equalsIgnoreCase(CommonNames.SYSINFO)){
      //type= manager.getLaunchConfigurationType("org.apache.derby.ui.sysinfoDerbyLaunchConfigurationType");
      type= manager.getLaunchConfigurationType(CommonNames.SYSINFO_LAUNCH_CONFIG_TYPE);
    }else{
      type = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
    }
    ILaunchConfiguration config = null;
    // if the configuration already exists, delete it
    ILaunchConfiguration[] configurations = manager.getLaunchConfigurations(type);
    for (int i = 0; i < configurations.length; i++) {
      if (configurations[i].getName().equals(name))
        configurations[i].delete();
    }
    // else create a new one
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

    job.schedule();
  }

  private ILaunchConfiguration getExistingJstdLaunchConfiguration(String projectName)
      throws CoreException {
    ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType type =
        launchManager.getLaunchConfigurationType(JSTD_LAUNCH_CONFIGURATION_TYPE);
    ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations(type);
    for (ILaunchConfiguration configuration : launchConfigurations) {
      if (configuration.getAttribute(PROJECT_NAME, "").equals(projectName)) {
        return configuration;
      }
    }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchManager

    }
    return null;
  }

  private void createJstdLaunchConfiguration(String projectName, List<String> testCases) {
    ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType type =
        launchManager.getLaunchConfigurationType(JSTD_LAUNCH_CONFIGURATION_TYPE);
    try {
      // create and initialize a new launch configuration
      ILaunchConfigurationWorkingCopy newLauchConfiguration = type.newInstance(
          null, launchManager.generateLaunchConfigurationName(projectName));
      newLauchConfiguration.setAttribute(PROJECT_NAME, projectName);
      newLauchConfiguration.setAttribute(LaunchConfigurationConstants.TESTS_TO_RUN, testCases);

      // let user edit/run/cancel the configuraion
      int result = DebugUITools.openLaunchConfigurationDialog(
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.