本文整理汇总了Java中org.eclipse.core.runtime.QualifiedName.getLocalName方法的典型用法代码示例。如果您正苦于以下问题:Java QualifiedName.getLocalName方法的具体用法?Java QualifiedName.getLocalName怎么用?Java QualifiedName.getLocalName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.runtime.QualifiedName
的用法示例。
在下文中一共展示了QualifiedName.getLocalName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadPreferences
import org.eclipse.core.runtime.QualifiedName; //导入方法依赖的package包/类
public static Properties loadPreferences(IFile f) throws CoreException {
int PLENGHT = PREFIX.length();
Properties props = new Properties();
String p = "";
Map<QualifiedName, String> map = f.getPersistentProperties();
for (QualifiedName qn : map.keySet()) {
String key = qn.getLocalName();
String value = map.get(qn);
if (key.startsWith(PREFIX))
p += key.substring(PLENGHT) + "=" + value + "\n";
else
props.put(key, value);
}
if (!p.isEmpty())
props.put(NET_SF_JASPERREPORTS_JRPROPERTIES, p);
return props;
}
示例2: getKeyString
import org.eclipse.core.runtime.QualifiedName; //导入方法依赖的package包/类
/**
* Assemble a string representation of a QualifiedName typed key
*
* @param key
* @return the assembled string key representation
*/
private synchronized String getKeyString(QualifiedName key) {
traceFunc("getKeyString");
String keyString = key.getQualifier() != null ? key.getQualifier() : "";
String ret = keyString + "." + key.getLocalName();
traceFunc("END getKeyString");
return ret;
}
示例3: getPersistentProperty
import org.eclipse.core.runtime.QualifiedName; //导入方法依赖的package包/类
@Override
public String getPersistentProperty(QualifiedName key) throws CoreException {
if (key.getLocalName().equals("PYTHON_PROJECT_VERSION")) {
// TODO the comment below says "always the latests", but it isn't!
return IPythonNature.PYTHON_VERSION_2_5;//for tests, always the latest version
}
//this is just for backward-compatibility
if (key.getLocalName().equals("PROJECT_SOURCE_PATH")) {
return "/test";
}
if (key.getLocalName().equals("PROJECT_EXTERNAL_SOURCE_PATH")) {
return "";
}
throw new RuntimeException(key.getLocalName());
}
示例4: stringify
import org.eclipse.core.runtime.QualifiedName; //导入方法依赖的package包/类
public static String stringify(final QualifiedName name) {
return fromNull(name.getQualifier()).orSome("") + "." + name.getLocalName();
}
示例5: Option
import org.eclipse.core.runtime.QualifiedName; //导入方法依赖的package包/类
Option(QualifiedName name, String defaultValue) {
this.name = name;
this.defaultValue = defaultValue;
this.value = defaultValue;
key = name.getQualifier()+"."+name.getLocalName();
}
示例6: computeSharedPropertyFileName
import org.eclipse.core.runtime.QualifiedName; //导入方法依赖的package包/类
/**
* Compute the file name to use for a given shared property
* @param qName QualifiedName
* @return String
*/
public String computeSharedPropertyFileName(QualifiedName qName) {
return '.' + qName.getLocalName();
}