本文整理汇总了Java中org.eclipse.debug.core.ILaunchManager.getLaunchConfigurationType方法的典型用法代码示例。如果您正苦于以下问题:Java ILaunchManager.getLaunchConfigurationType方法的具体用法?Java ILaunchManager.getLaunchConfigurationType怎么用?Java ILaunchManager.getLaunchConfigurationType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.ILaunchManager
的用法示例。
在下文中一共展示了ILaunchManager.getLaunchConfigurationType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: launchFile
import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
/**
* Launch a file, using the file information, which means using default launch configurations.
*/
protected void launchFile(IFile originalFileToRun, String mode) {
final String runnerId = getRunnerId();
final String path = originalFileToRun.getFullPath().toOSString();
final URI moduleToRun = URI.createPlatformResourceURI(path, true);
final String implementationId = chooseImplHelper.chooseImplementationIfRequired(runnerId, moduleToRun);
if (implementationId == ChooseImplementationHelper.CANCEL)
return;
RunConfiguration runConfig = runnerFrontEnd.createConfiguration(runnerId, implementationId, moduleToRun);
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(getLaunchConfigTypeID());
DebugUITools.launch(runConfigConverter.toLaunchConfiguration(type, runConfig), mode);
// execution dispatched to proper delegate LaunchConfigurationDelegate
}
示例2: 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;
}
示例3: 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);
}
}
示例4: createMavenPackagingLaunchConfiguration
import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
@VisibleForTesting
static ILaunchConfiguration createMavenPackagingLaunchConfiguration(IProject project)
throws CoreException {
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigurationType = launchManager
.getLaunchConfigurationType(MavenLaunchConstants.LAUNCH_CONFIGURATION_TYPE_ID);
String launchConfigName = "CT4E App Engine flexible Maven deploy artifact packaging "
+ project.getLocation().toString().replaceAll("[^a-zA-Z0-9]", "_");
ILaunchConfigurationWorkingCopy workingCopy = launchConfigurationType.newInstance(
null /*container*/, launchConfigName);
workingCopy.setAttribute(ILaunchManager.ATTR_PRIVATE, true);
// IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND;
workingCopy.setAttribute("org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND", true);
workingCopy.setAttribute(MavenLaunchConstants.ATTR_POM_DIR, project.getLocation().toString());
workingCopy.setAttribute(MavenLaunchConstants.ATTR_GOALS, "package");
workingCopy.setAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, "${project}");
workingCopy.setAttribute(RefreshUtil.ATTR_REFRESH_RECURSIVE, true);
IPath jreContainerPath = getJreContainerPath(project);
workingCopy.setAttribute(
IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, jreContainerPath.toString());
return workingCopy;
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:27,代码来源:FlexMavenPackagedProjectStagingDelegate.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_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;
}
}
示例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_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;
}
}
示例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_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;
}
}
示例8: 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;
}
}
示例9: 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;
}
}
示例10: getRemoteDebugConfig
import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfigurationWorkingCopy getRemoteDebugConfig(IProject activeProj) throws CoreException {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_REMOTE_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy config = type.newInstance(null, "Debug "+activeProj.getName());
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, activeProj.getName());
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_ALLOW_TERMINATE, true);
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_CONNECTOR, IJavaLaunchConfigurationConstants.ID_SOCKET_ATTACH_VM_CONNECTOR);
IVMConnector connector = JavaRuntime.getVMConnector(IJavaLaunchConfigurationConstants.ID_SOCKET_ATTACH_VM_CONNECTOR);
Map<String, Argument> def = connector.getDefaultArguments();
Map<String, String> argMap = new HashMap<String, String>(def.size());
argMap.put("hostname", getHostname(activeProj));
argMap.put("port", "8348");
WPILibJavaPlugin.logInfo(argMap.toString());
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, argMap);
return config;
}
示例11: 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;
}
示例12: 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;
}
示例13: createConfiguration
import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
protected ILaunchConfiguration createConfiguration(IType type)
throws CoreException {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType configType = manager
.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
ILaunchConfigurationWorkingCopy workingCopy = configType.newInstance(
null, manager.generateLaunchConfigurationName(type
.getTypeQualifiedName('.')));
workingCopy.setAttribute(
IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
type.getFullyQualifiedName());
workingCopy.setAttribute(
IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type
.getJavaProject().getElementName());
workingCopy.setMappedResources(new IResource[] { type
.getUnderlyingResource() });
return workingCopy.doSave();
}
示例14: 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;
}
示例15: 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;
}