本文整理汇总了Java中org.eclipse.debug.core.ILaunchConfiguration.getType方法的典型用法代码示例。如果您正苦于以下问题:Java ILaunchConfiguration.getType方法的具体用法?Java ILaunchConfiguration.getType怎么用?Java ILaunchConfiguration.getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.ILaunchConfiguration
的用法示例。
在下文中一共展示了ILaunchConfiguration.getType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRunnerId
import org.eclipse.debug.core.ILaunchConfiguration; //导入方法依赖的package包/类
/**
* Read the N4JS runner ID from the given Eclipse launch configuration. Will throw exceptions if 'failFast' is
* <code>true</code>, otherwise will return <code>null</code> in case of error.
*/
public static String getRunnerId(ILaunchConfiguration launchConfig, boolean failFast) {
try {
// 1) simple case: runnerId already defined in launchConfig
final String id = launchConfig.getAttribute(RunConfiguration.RUNNER_ID, (String) null);
if (id != null)
return id;
// 2) tricky case: not set yet, so have to go via the ILaunchConfigurationType or the launchConfig
final ILaunchConfigurationType launchConfigType = launchConfig.getType();
return getRunnerId(launchConfigType, failFast);
} catch (CoreException e) {
if (failFast)
throw new WrappedException(e);
return null;
}
}