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