當前位置: 首頁>>代碼示例>>Java>>正文


Java ILaunchConfiguration.getName方法代碼示例

本文整理匯總了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();
}
 
開發者ID:eclipse,項目名稱:eclemma,代碼行數:17,代碼來源:LaunchLabelProvider.java

示例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;
}
 
開發者ID:dakaraphi,項目名稱:eclipse-plugin-commander,代碼行數:11,代碼來源:LaunchProvider.java

示例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;
}
 
開發者ID:turnus,項目名稱:turnus,代碼行數:39,代碼來源:Configuration.java


注:本文中的org.eclipse.debug.core.ILaunchConfiguration.getName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。