Examples of ILaunchConfigurationType


Examples of org.eclipse.debug.core.ILaunchConfigurationType

   
  }
  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
    if (config == null) {
      ILaunchConfigurationWorkingCopy wc = type.newInstance(null, name);
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
        proj.getProject().getName());
      // current directory should be the project root
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
        proj.getProject().getLocation().toString());
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  }

  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.ILaunchConfigurationType

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

Examples of org.eclipse.debug.core.ILaunchConfigurationType

public class JavascriptLaunchConfigurationHelper {

  public ILaunchConfiguration getLaunchConfiguration(String projectName) {
    try {
      ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
      ILaunchConfigurationType type =
          launchManager.getLaunchConfigurationType(JSTD_LAUNCH_CONFIGURATION_TYPE);
      ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations(type);
      for (ILaunchConfiguration launchConfiguration : launchConfigurations) {
        String configProjectName =
            launchConfiguration.getAttribute(LaunchConfigurationConstants.PROJECT_NAME, "");
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  public boolean isExistingLaunchConfigWithRunOnSaveOtherThanCurrent(String projectName,
      String launchConfigName) {
    try {
      ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
      ILaunchConfigurationType type =
          launchManager.getLaunchConfigurationType(JSTD_LAUNCH_CONFIGURATION_TYPE);
      ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations(type);
      for (ILaunchConfiguration launchConfiguration : launchConfigurations) {
        String configProjectName =
            launchConfiguration.getAttribute(LaunchConfigurationConstants.PROJECT_NAME, "");
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  /**
   * Executes configured script and returns created {@link ILaunch}.
   */
  public ILaunch execute(IProgressMonitor monitor) throws CoreException {
    ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType type =
        launchManager.getLaunchConfigurationType("org.eclipse.ant.AntLaunchConfigurationType"/*IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE*/);
    String name = launchManager.generateUniqueLaunchConfigurationNameFrom(m_antFile.getName());
    ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, name);
    // initialize with default values
    {
      workingCopy.setAttribute(
          IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER,
          "org.eclipse.ant.ui.AntClasspathProvider");
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  public static String[] getGWTProjectClasspath(IProject project) throws CoreException {
    // create new launch configuration just as container for parameters, we are not going to save it
    ILaunchConfigurationWorkingCopy launchConfiguration;
    {
      ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
      ILaunchConfigurationType launchConfigurationType =
          launchManager.getLaunchConfigurationType(Constants.LAUNCH_TYPE_ID_SHELL);
      launchConfiguration = launchConfigurationType.newInstance(null, "__GWTDesigner_tmp");
    }
    // set project name
    launchConfiguration.setAttribute(
        IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
        project.getName());
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

    }
  }

  public void runJar(JarModule jar, IProgressMonitor monitor) {
    log.fine("Run Jar: " + jar);
    ILaunchConfigurationType launchConfigType =
        DebugPlugin.getDefault().getLaunchManager()
            .getLaunchConfigurationType(
                "org.apache.hadoop.eclipse.launch.StartServer");

    jars.add(jar);
    fireJarPublishStart(jar);

    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 =
          launchConfigType.getDelegate("run");
      // only support run for now
      DebugUITools.launch(saved, "run");
    } catch (CoreException e) {
      // TODO(jz) autogen
      e.printStackTrace();
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

        containerHandleId = EMPTY_STRING;
        testName = resource.getName();
        String resources = testName;

        ILaunchConfigurationType configType = getLaunchManager().getLaunchConfigurationType(getLaunchConfigurationTypeId());
        ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateLaunchConfigurationName(testName));


        wc.setAttribute("resource", resources);
        wc.setAttribute("Mpath", resource.getFullPath().toString());
        //    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, resource.getProject().getName());
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

        return null;
    }

    private List findExistingLaunchConfigurations(ILaunchConfigurationWorkingCopy temporary) throws CoreException
    {
        ILaunchConfigurationType configType = temporary.getType();

        ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations(configType);
        String[] attributeToCompare = getAttributeNamesToCompare();

        ArrayList candidateConfigs = new ArrayList(configs.length);
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.