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