本文整理匯總了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();
}