本文整理汇总了Java中org.eclipse.debug.core.ILaunchConfigurationType.getName方法的典型用法代码示例。如果您正苦于以下问题:Java ILaunchConfigurationType.getName方法的具体用法?Java ILaunchConfigurationType.getName怎么用?Java ILaunchConfigurationType.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.ILaunchConfigurationType
的用法示例。
在下文中一共展示了ILaunchConfigurationType.getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeLaunchConfigNameFrom
import org.eclipse.debug.core.ILaunchConfigurationType; //导入方法依赖的package包/类
/**
* Computes the launch configuration name from the file to run and the configuration. The latter is appended in
* parentheses after the name in order to make the name unique -- otherwise, running a file with different engines
* would result in loosing all configuration run before the last one.
*
*/
public static String computeLaunchConfigNameFrom(IFile originalFileToRun, ILaunchConfigurationType type) {
String configname = originalFileToRun.getFullPath().toString().replace('/', '-');
if (configname.startsWith("-")) {
configname = configname.substring(1);
}
configname += " (" + type.getName() + ")";
return configname;
}
示例2: calcExtendedProcessLabel
import org.eclipse.debug.core.ILaunchConfigurationType; //导入方法依赖的package包/类
public static String calcExtendedProcessLabel(IProcess process) {
ILaunch launch = process.getLaunch();
StringBuffer buffer = new StringBuffer();
if (process.isTerminated()) {
try {
int exitValue = process.getExitValue();
buffer.append("<exit code: " + exitValue + "> ");
} catch (DebugException e) {
// Should not happen
}
}
ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
if (launchConfiguration != null) {
buffer.append(launchConfiguration.getName());
try {
ILaunchConfigurationType launchConfigType = launchConfiguration.getType();
if (launchConfigType != null) {
String type = launchConfigType.getName();
buffer.append(" [");
buffer.append(type);
buffer.append("] ");
}
} catch (CoreException ce) {
EclipseCore.logStatus(ce);
}
}
buffer.append(process.getLabel());
return buffer.toString();
}