当前位置: 首页>>代码示例>>Java>>正文


Java ILaunchManager.getLaunchConfigurations方法代码示例

本文整理汇总了Java中org.eclipse.debug.core.ILaunchManager.getLaunchConfigurations方法的典型用法代码示例。如果您正苦于以下问题:Java ILaunchManager.getLaunchConfigurations方法的具体用法?Java ILaunchManager.getLaunchConfigurations怎么用?Java ILaunchManager.getLaunchConfigurations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.debug.core.ILaunchManager的用法示例。


在下文中一共展示了ILaunchManager.getLaunchConfigurations方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLaunchConfiguration

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
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,
              "");
      if (configProjectName.equals(projectName)
          && isValidToRun(projectName, launchConfiguration)) {
        return launchConfiguration;
      }
    }
  } catch (CoreException e) {
    //logger.logException(e);
  }
  return null;
}
 
开发者ID:BladeRunnerJS,项目名称:brjs-JsTestDriver,代码行数:21,代码来源:JavascriptLaunchConfigurationHelper.java

示例2: addLaunchCfg

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private void addLaunchCfg() {
	try {
		ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
		ILaunchConfigurationType type = manager
				.getLaunchConfigurationType("org.eclipse.pde.ui.RuntimeWorkbench");
		ILaunchConfiguration[] lcs = manager.getLaunchConfigurations(type);
		List<ILaunchConfiguration> configList = Arrays.asList(lcs);
		List<String> configs = configList.stream().map(config -> config.getName()).collect(Collectors.toList());
		ComboDialog dialog = new ComboDialog(getShell(), true);
		dialog.setTitle("Choose launch config");
		dialog.setInfoText("Choose Eclipse launch conguration to edit it's configuration settings");
		dialog.setAllowedValues(configs);
		if (dialog.open() == OK) {
			String selectedName = dialog.getValue();
			ILaunchConfiguration selectedConfig = configList.stream().filter(config -> selectedName.equals(config.getName())).findFirst().get();
			String configLocation = getConfigLocation(selectedConfig);
			valueAdded(new File(configLocation, ".settings").getAbsolutePath());
			buttonPressed(IDialogConstants.OK_ID);
		}
	} catch (CoreException e) {
		PrefEditorPlugin.log(e);
	}
}
 
开发者ID:32kda,项目名称:com.onpositive.prefeditor,代码行数:24,代码来源:FolderSelectionDialog.java

示例3: getConfigurations

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfiguration[] getConfigurations(IFile file) {
	ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
	ILaunchConfigurationType type = manager.getLaunchConfigurationType(LAUNCH_CONFIG_TYPE_CODE_ANALYSIS);
	try {
		// configurations that match the given resource
		List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();

		// candidates
		ILaunchConfiguration[] candidates = manager.getLaunchConfigurations(type);
		String name = FileUtils.getRelativePath(file);
		for (ILaunchConfiguration config : candidates) {
			String fileName = config.getAttribute(CAL_XDF.longName(), "");
			if (fileName.equals(name)) {
				configs.add(config);
			}
		}

		return configs.toArray(new ILaunchConfiguration[] {});
	} catch (Exception e) {
		e.printStackTrace();
		return null;
	}
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:24,代码来源:OrccCodeAnalysisLaunchShortcut.java

示例4: getConfigurations

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfiguration[] getConfigurations(IFile file) {
	ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
	ILaunchConfigurationType type = manager.getLaunchConfigurationType(LAUNCH_CONFIG_TYPE_NUMA_EXECUTION_ANALYSIS);
	try {
		// configurations that match the given resource
		List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();

		// candidates
		ILaunchConfiguration[] candidates = manager.getLaunchConfigurations(type);
		String name = FileUtils.getRelativePath(file);
		for (ILaunchConfiguration config : candidates) {
			String fileName = config.getAttribute(CAL_XDF.longName(), "");
			if (fileName.equals(name)) {
				configs.add(config);
			}
		}

		return configs.toArray(new ILaunchConfiguration[] {});
	} catch (Exception e) {
		e.printStackTrace();
		return null;
	}
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:24,代码来源:OrccNumaExecutionLaunchShortcut.java

示例5: getConfigurations

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfiguration[] getConfigurations(IFile file) {
	ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
	ILaunchConfigurationType type = manager.getLaunchConfigurationType(LAUNCH_CONFIG_TYPE_TABU_PERFORMANCE_ESTMATION_ANALYSIS);
	try {
		// configurations that match the given resource
		List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();

		// candidates
		ILaunchConfiguration[] candidates = manager.getLaunchConfigurations(type);
		String name = FileUtils.getRelativePath(file);
		for (ILaunchConfiguration config : candidates) {
			String fileName = config.getAttribute(CAL_XDF.longName(), "");
			if (fileName.equals(name)) {
				configs.add(config);
			}
		}

		return configs.toArray(new ILaunchConfiguration[] {});
	} catch (Exception e) {
		e.printStackTrace();
		return null;
	}
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:24,代码来源:TabuSearchPerformanceEstimationLaunchShortcut.java

示例6: getConfigurations

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfiguration[] getConfigurations(IFile file) {
	ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
	ILaunchConfigurationType type = manager
			.getLaunchConfigurationType(LAUNCH_CONFIG_TYPE_DYNAMIC_EXECUTION_ANALYSIS);
	try {
		// configurations that match the given resource
		List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();

		// candidates
		ILaunchConfiguration[] candidates = manager.getLaunchConfigurations(type);
		String name = FileUtils.getRelativePath(file);
		for (ILaunchConfiguration config : candidates) {
			String fileName = config.getAttribute(CAL_XDF.longName(), "");
			if (fileName.equals(name)) {
				configs.add(config);
			}
		}

		return configs.toArray(new ILaunchConfiguration[] {});
	} catch (Exception e) {
		e.printStackTrace();
		return null;
	}
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:25,代码来源:OrccDynamicExecutionLaunchShortcut.java

示例7: getConfigurations

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfiguration[] getConfigurations(IFile file) {
	ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
	ILaunchConfigurationType type = manager.getLaunchConfigurationType(LAUNCH_CONFIG_TYPE_DYNAMIC_INTERPRETER_ANALYSIS);
	try {
		// configurations that match the given resource
		List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();

		// candidates
		ILaunchConfiguration[] candidates = manager.getLaunchConfigurations(type);
		String name = FileUtils.getRelativePath(file);
		for (ILaunchConfiguration config : candidates) {
			String fileName = config.getAttribute(CAL_XDF.longName(), "");
			if (fileName.equals(name)) {
				configs.add(config);
			}
		}

		return configs.toArray(new ILaunchConfiguration[] {});
	} catch (Exception e) {
		e.printStackTrace();
		return null;
	}
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:24,代码来源:OrccDynamicInterpreterLaunchShortcut.java

示例8: getByName

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
/**
 * @see Model#getByName(String)
 */
public static Model getByName(final String fullQualifiedModelName) {
	Assert.isNotNull(fullQualifiedModelName);
	Assert.isLegal(!fullQualifiedModelName.contains(Model.SPEC_MODEL_DELIM), "Not a full-qualified model name.");
	
       final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
       final ILaunchConfigurationType launchConfigurationType = launchManager
               .getLaunchConfigurationType(TLCModelLaunchDelegate.LAUNCH_CONFIGURATION_TYPE);

	try {
		final ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations(launchConfigurationType);
		for (int i = 0; i < launchConfigurations.length; i++) {
			// Can do equals here because of full qualified name.
			final ILaunchConfiguration launchConfiguration = launchConfigurations[i];
			if (fullQualifiedModelName.equals(launchConfiguration.getName())) {
				return launchConfiguration.getAdapter(Model.class);
			}
		}
	} catch (CoreException shouldNeverHappen) {
		shouldNeverHappen.printStackTrace();
	}
	
	return null;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:27,代码来源:TLCModelFactory.java

示例9: getBy

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
public static Model getBy(final IFile aFile) {
	Assert.isNotNull(aFile);
	
       final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
       final ILaunchConfigurationType launchConfigurationType = launchManager
               .getLaunchConfigurationType(TLCModelLaunchDelegate.LAUNCH_CONFIGURATION_TYPE);

	try {
		final ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations(launchConfigurationType);
		for (int i = 0; i < launchConfigurations.length; i++) {
			// Can do equals here because of full qualified name.
			final ILaunchConfiguration launchConfiguration = launchConfigurations[i];
			if (aFile.equals(launchConfiguration.getFile())) {
				return launchConfiguration.getAdapter(Model.class);
			}
		}
	} catch (CoreException shouldNeverHappen) {
		shouldNeverHappen.printStackTrace();
	}
	
	return null;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:23,代码来源:TLCModelFactory.java

示例10: findConfig

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
/**
 * Looks for and returns an existing {@link ILaunchConfiguration} object for a
 * specified project.
 * @param manager The {@link ILaunchManager}.
 * @param type The {@link ILaunchConfigurationType}.
 * @param projectName The name of the project
 * @return an existing <code>ILaunchConfiguration</code> object matching the project, or
 *      <code>null</code>.
 */
public static ILaunchConfiguration findConfig(ILaunchManager manager,
        ILaunchConfigurationType type, String projectName) {
    try {
        ILaunchConfiguration[] configs = manager.getLaunchConfigurations(type);

        for (ILaunchConfiguration config : configs) {
            if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "")
            		.equals(projectName)) {  //$NON-NLS-1$
                return config;
            }
        }
    } catch (CoreException e) {
        MessageDialog.openError(Display.getCurrent().getActiveShell(),
                "Launch Error", e.getStatus().getMessage());
    }

    // didn't find anything that matches. Return null
    return null;
}
 
开发者ID:thahn0720,项目名称:agui_eclipse_plugin,代码行数:29,代码来源:AguiLaunchController.java

示例11: getLaunchConfiguration

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
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)
          && isValidToRun(projectName, launchConfiguration)) {
        return launchConfiguration;
      }
    }
  } catch (CoreException e) {
    logger.logException(e);
  }
  return null;
}
 
开发者ID:mhevery,项目名称:testability-explorer,代码行数:21,代码来源:TestabilityLaunchConfigurationHelper.java

示例12: isExistingLaunchConfigWithRunOnBuildOtherThanCurrent

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
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 =
          launchConfiguration.getAttribute(TestabilityConstants.CONFIGURATION_ATTR_RUN_ON_BUILD,
              false);
      String configName = launchConfiguration.getName();
      boolean isProjectNameEqual = configProjectName.equals(projectName);
      boolean isLaunchConfigNameEqual = launchConfigName.equals(configName); 
      if (isProjectNameEqual && runOnEveryBuild && !isLaunchConfigNameEqual) {
        return true;
      }
    }
  } catch (CoreException e) {
    logger.logException(e);
  }
  return false;
}
 
开发者ID:mhevery,项目名称:testability-explorer,代码行数:27,代码来源:TestabilityLaunchConfigurationHelper.java

示例13: getLaunchConfigurations

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
/**
 * @param typeIds launch configuration type ids that will be searched for, or
 *          empty to match all
 * @throws CoreException
 */
public static List<ILaunchConfiguration> getLaunchConfigurations(
    IProject project, String... typeIds) throws CoreException {
  Set<String> setOfTypeIds = new HashSet<String>(Arrays.asList(typeIds));
  ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
  List<ILaunchConfiguration> launchConfigs = new ArrayList<ILaunchConfiguration>();
  for (ILaunchConfiguration launchConfig : manager.getLaunchConfigurations()) {
    IJavaProject javaProject = getJavaProject(launchConfig);
    boolean typeIdIsOk = setOfTypeIds.isEmpty()
        || setOfTypeIds.contains(launchConfig.getType().getIdentifier());
    if (javaProject != null && project.equals(javaProject.getProject())
        && typeIdIsOk) {
      launchConfigs.add(launchConfig);
    }
  }

  return launchConfigs;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:23,代码来源:LaunchConfigurationUtilities.java

示例14: removeLaunchConfig

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private static void removeLaunchConfig(String launchConfigName) throws Exception {
  ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
  try {
    ILaunchConfiguration[] launchConfigs = manager.getLaunchConfigurations();
    for (ILaunchConfiguration launchConfig : launchConfigs) {
      if (launchConfig.getName().equals(launchConfigName)) {
        launchConfig.delete();
        break;
      }
    }

  } catch (CoreException e) {
    GWTPluginLog.logError(e);
    throw new Exception("Could not remove existing Java launch configuration");
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:17,代码来源:NewProjectCreatorTool.java

示例15: findConfigurationByName

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
public static ILaunchConfiguration findConfigurationByName(String name) {
  try {
    String configTypeStr = WebAppLaunchConfiguration.TYPE_ID;
    ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType typeid = launchManager.getLaunchConfigurationType(configTypeStr);
    ILaunchConfiguration[] configs = launchManager.getLaunchConfigurations(typeid);

    for (ILaunchConfiguration config : configs) {
      if (config.getName().equals(name)) {
        return config;
      }
    }
  } catch (CoreException e) {
    CorePluginLog.logError(e);
  }
  return null;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:18,代码来源:WebAppLaunchUtil.java


注:本文中的org.eclipse.debug.core.ILaunchManager.getLaunchConfigurations方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。