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


Java ILaunchConfigurationType.getName方法代码示例

本文整理汇总了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;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:15,代码来源:LaunchXpectShortcut.java

示例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();
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:35,代码来源:RuntimeProcessExtension.java


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