Package org.eclipse.debug.core

Examples of org.eclipse.debug.core.ILaunchManager


        try {
            String fileProjectName = file.getProject().getName();
            String fileName = file.getName();

            ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
            ILaunchConfigurationType configurationType =
                launchManager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
            String name = launchManager.generateUniqueLaunchConfigurationNameFrom(fileName);

            ILaunchConfigurationWorkingCopy workingLaunchConfiguration = configurationType.newInstance(null, name);
            workingLaunchConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
                PivotPlugin.MAIN_TYPE_NAME);
            workingLaunchConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
View Full Code Here


   * from the application context.
   */
  @SuppressWarnings("restriction")
  public Object execute(ExecutionEvent event) throws ExecutionException {

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

    WorkbenchWindow window = (WorkbenchWindow) HandlerUtil
        .getActiveWorkbenchWindowChecked(event);

    RunJettyRunLaunch.launch(window);
View Full Code Here

public class RunJettyRunLaunchConfigurationUtil {


  public static ILaunchConfiguration findLaunchConfiguration(
      String projectName) {
    ILaunchManager lnmanger = DebugPlugin.getDefault().getLaunchManager();
    try {
      for (ILaunchConfiguration lc : lnmanger.getLaunchConfigurations()) {

        String currentProjectName = lc
            .getAttribute(
                IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
                "");
View Full Code Here

public class RunJettyRunLaunchConfigurationUtil {

  public static ILaunchConfiguration findLaunchConfiguration(
      String projectName) {
    ILaunchManager lnmanger = DebugPlugin.getDefault().getLaunchManager();
    try {
      for (ILaunchConfiguration lc : lnmanger.getLaunchConfigurations()) {

        if (isSupported(lc, projectName))
          return lc;

      }
View Full Code Here

public class RunJettyRunLaunchConfigurationUtil {

  public static ILaunchConfiguration findLaunchConfiguration(
      String projectName) {
    ILaunchManager lnmanger = DebugPlugin.getDefault().getLaunchManager();
    try {
      for (ILaunchConfiguration lc : lnmanger.getLaunchConfigurations()) {

        if (isSupported(lc, projectName))
          return lc;

      }
View Full Code Here

public class RunJettyRunLaunchConfigurationUtil {

  public static ILaunchConfiguration findLaunchConfiguration(
      String projectName) {
    ILaunchManager lnmanger = DebugPlugin.getDefault().getLaunchManager();
    try {
      for (ILaunchConfiguration lc : lnmanger.getLaunchConfigurations()) {

        if (isSupported(lc, projectName))
          return lc;

      }
View Full Code Here

   * Returns existing or new launch configuration for given GWT module file.
   */
  private ILaunchConfiguration getExistingOrNewConfiguration(ModuleDescription module)
      throws CoreException {
    // prepare launch parameters
    ILaunchManager launchManager = getLaunchManager();
    ILaunchConfigurationType configurationType = getConfigurationType();
    // prepare module parameters
    IProject project = module.getProject();
    String moduleId = module.getId();
    String moduleName = module.getSimpleName();
    // try to find existing launch configuration for current module
    {
      // prepare list of candidates
      List<ILaunchConfiguration> candidateConfigurations;
      {
        candidateConfigurations = new ArrayList<ILaunchConfiguration>();
        ILaunchConfiguration[] launchConfigurations =
            launchManager.getLaunchConfigurations(configurationType);
        for (int i = 0; i < launchConfigurations.length; i++) {
          ILaunchConfiguration configuration = launchConfigurations[i];
          if (configuration.getAttribute(Constants.LAUNCH_ATTR_MODULE, "").equals(moduleId)) {
            if (configuration.getAttribute(Constants.LAUNCH_ATTR_PROJECT, "").equals(
                project.getName())) {
              candidateConfigurations.add(configuration);
            }
          }
        }
      }
      // use only one configuration or prompt user to choose one
      int candidateCount = candidateConfigurations.size();
      if (candidateCount == 1) {
        return candidateConfigurations.get(0);
      }
      if (candidateCount > 1) {
        return chooseConfiguration(candidateConfigurations);
      }
    }
    // create new configuration
    {
      // create working copy
      ILaunchConfigurationWorkingCopy wc;
      {
        String configurationName =
            launchManager.generateUniqueLaunchConfigurationNameFrom(moduleName);
        wc = configurationType.newInstance(null, configurationName);
        wc.setAttribute(Constants.LAUNCH_ATTR_PROJECT, project.getName());
        wc.setAttribute(Constants.LAUNCH_ATTR_MODULE, moduleId);
        wc.setAttribute(Constants.LAUNCH_ATTR_LOG_LEVEL, "INFO");
        wc.setAttribute(Constants.LAUNCH_ATTR_DIR_WAR, WebUtils.getWebFolderName(project));
View Full Code Here

     *         the one in {@link JUnitLaunchShortcut} so that we can return
     *         a Cactus configuration type and not a JUnit one
     */
    protected ILaunchConfigurationType getJUnitLaunchConfigType()
    {
        ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
        String configID = CactusLaunchConfiguration.ID_CACTUS_APPLICATION;
        if (CactusPreferences.getJetty())
        {
            configID =
                JettyCactusLaunchConfiguration.ID_CACTUS_APPLICATION_JETTY;
        }
        return lm.getLaunchConfigurationType(configID);
    }
View Full Code Here

                " : " + buildFilePath,
                null);
        }
        File buildFileLocation = new File(buildFileURL.getPath());

        ILaunchManager launchManager =
            DebugPlugin.getDefault().getLaunchManager();
        ILaunchConfigurationType antType =
            launchManager.getLaunchConfigurationType(
                IExternalToolConstants.ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE); //ID_ANT_LAUNCH_CONFIGURATION_TYPE
               
        String name = "Cactus container start-up";
        String uniqueName =
            launchManager.generateUniqueLaunchConfigurationNameFrom(name);
        ILaunchConfigurationWorkingCopy antConfig =
            antType.newInstance(null, uniqueName);

        antConfig.setAttribute(
            IExternalToolConstants.ATTR_LOCATION,
View Full Code Here

                public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
                    try {
                        progressMonitor.beginTask("Starting SCA Composite", 100);
                       
                        // Get our launch configuration type
                        ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
                        ILaunchConfigurationType launchConfigurationType =launchManager.getLaunchConfigurationType(
                                                                                                       "org.apache.tuscany.sca.core.launch.configurationtype");
                        progressMonitor.worked(10);
                        if (progressMonitor.isCanceled()) {
                            return;
                        }
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.