本文整理汇总了Java中org.eclipse.core.runtime.preferences.IEclipsePreferences.childrenNames方法的典型用法代码示例。如果您正苦于以下问题:Java IEclipsePreferences.childrenNames方法的具体用法?Java IEclipsePreferences.childrenNames怎么用?Java IEclipsePreferences.childrenNames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.runtime.preferences.IEclipsePreferences
的用法示例。
在下文中一共展示了IEclipsePreferences.childrenNames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addListeners
import org.eclipse.core.runtime.preferences.IEclipsePreferences; //导入方法依赖的package包/类
private void addListeners(IEclipsePreferences node) throws CoreException {
addListener(node);
try {
for (String childName : node.childrenNames()) {
IEclipsePreferences child = (IEclipsePreferences) node.node(childName);
this.addListeners(child);
}
} catch (BackingStoreException e) {
throw new CoreException(new Status(IStatus.ERROR, MechanicPlugin.PLUGIN_ID,
"Could not read children for preference node", e));
}
}
示例2: readConfig
import org.eclipse.core.runtime.preferences.IEclipsePreferences; //导入方法依赖的package包/类
public static ArrayList<Group> readConfig() throws BackingStoreException {
ArrayList<Group> groups = new ArrayList<Group>();
IEclipsePreferences pref = getPreferences();
for(String child: pref.childrenNames()) {
Preferences prefG = pref.node(child);
Group g = new Group(Integer.parseInt(child.substring(GROUPID.length())));
for(int i = 0; i < prefG.getInt(MEMBERCOUNT, 0); ++i) {
g.addMember(prefG.get(MEMBER + i, "default"));
}
groups.add(g);
}
return groups;
}