本文整理汇总了Java中org.eclipse.emf.edit.provider.ITreeItemContentProvider.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java ITreeItemContentProvider.getChildren方法的具体用法?Java ITreeItemContentProvider.getChildren怎么用?Java ITreeItemContentProvider.getChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.emf.edit.provider.ITreeItemContentProvider
的用法示例。
在下文中一共展示了ITreeItemContentProvider.getChildren方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createLinks
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; //导入方法依赖的package包/类
private static void createLinks(EObject root, PrintStream out, Set<String> set) {
ITreeItemContentProvider cp = EMFUtils.adapt(root, ITreeItemContentProvider.class);
for (Object c : cp.getChildren(root)) {
EObject child = (EObject) c;
String link = createLink(root, child);
if (!set.contains(link)) {
set.add(link);
out.println(link);
}
createLinks(child, out, set);
}
}
示例2: getChildren
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Collection<?> getChildren(Object object) {
ITreeItemContentProvider cp = (ITreeItemContentProvider) this.adapterFactory.adapt(object, ITreeItemContentProvider.class);
Collection<?> children = cp == null ? Collections.emptyList() : cp.getChildren(object);
List<EPlanElement> planElements = new ArrayList<EPlanElement>();
if (object instanceof EPlanElement) {
for (Object o : children) {
if (o instanceof EPlanElement) {
planElements.add((EPlanElement) o);
}
}
}
return planElements;
}
示例3: getChildren
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Collection<?> getChildren(Object object) {
ITreeItemContentProvider cp = (ITreeItemContentProvider) this.adapterFactory.adapt(object, ITreeItemContentProvider.class);
return cp == null ? Collections.emptyList() : cp.getChildren(object);
}