本文整理匯總了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;
}
}