本文整理汇总了Java中org.eclipse.debug.core.ILaunchConfiguration.getName方法的典型用法代码示例。如果您正苦于以下问题:Java ILaunchConfiguration.getName方法的具体用法?Java ILaunchConfiguration.getName怎么用?Java ILaunchConfiguration.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.ILaunchConfiguration
的用法示例。
在下文中一共展示了ILaunchConfiguration.getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLaunchText
import org.eclipse.debug.core.ILaunchConfiguration; //导入方法依赖的package包/类
public static String getLaunchText(ILaunch launch) {
// new launch configuration
final ILaunchConfiguration config = launch.getLaunchConfiguration();
if (config == null) {
return UIMessages.DumpExecutionDataUnknownLaunch_value;
}
StringBuilder sb = new StringBuilder(config.getName());
sb.append(" ["); //$NON-NLS-1$
try {
sb.append(config.getType().getName());
} catch (CoreException e) {
EclEmmaUIPlugin.log(e);
}
sb.append("]"); //$NON-NLS-1$
return sb.toString();
}
示例2: getElementForId
import org.eclipse.debug.core.ILaunchConfiguration; //导入方法依赖的package包/类
@Override
public QuickAccessElement getElementForId(String id) {
try {
ILaunchConfiguration configuration = DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(id);
return new LauncherElement(this, configuration.getMemento(), configuration.getName(), configuration.getType().getName());
} catch (CoreException e) {
e.printStackTrace();
}
return null;
}
示例3: parse
import org.eclipse.debug.core.ILaunchConfiguration; //导入方法依赖的package包/类
/**
* Parse the launch configuration. If the method is "debug" then the
* {@link TurnusOptions.CONFIG_VERBOSE} is set to true
*
* @param lconf
* the launch configuration
* @param mode
* the mode name (e.g. "run", "debug")
* @return the parsed configuration
* @throws TurnusException
* raised if the configuration cannot be parsed
*/
public static Configuration parse(ILaunchConfiguration launcgConfiguration, String mode)
throws TurnusException {
Configuration conf = new Configuration();
// set the configuration name
String name = launcgConfiguration.getName();
name = name == null || name.isEmpty() ? "Launch configuration " + DateUtil.now() : name;
conf.setName(name);
try {
// parse the launch configuration
for (Entry<String, Object> entry : launcgConfiguration.getAttributes().entrySet()) {
String key = entry.getKey();
String value = entry.getValue().toString();
if (!key.startsWith(CONFIGURATION_UNDEFINED_OPTION) && value != null)
conf.setRawValue(key, value);
}
if ("debug".equals(mode)) {
conf.setValue(TurnusOptions.CONFIG_VERBOSE, true);
}
} catch (Exception e) {
throw new TurnusException("Error parsing the launch configuration \"" + name + "\"", e);
}
return conf;
}