本文整理汇总了Java中com.intellij.ide.util.treeView.AbstractTreeNode.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractTreeNode.getChildren方法的具体用法?Java AbstractTreeNode.getChildren怎么用?Java AbstractTreeNode.getChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.util.treeView.AbstractTreeNode
的用法示例。
在下文中一共展示了AbstractTreeNode.getChildren方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSummaryForRootNode
import com.intellij.ide.util.treeView.AbstractTreeNode; //导入方法依赖的package包/类
@Override
public String getSummaryForRootNode(AbstractTreeNode childNode) {
final Object value = childNode.getValue();
String coverageInformationString = myAnnotator.getPackageCoverageInformationString((PsiPackage)value, null,
myCoverageDataManager);
if (coverageInformationString == null) {
if (!myCoverageViewManager.isReady()) return "Loading...";
PackageAnnotator.SummaryCoverageInfo info = new PackageAnnotator.PackageCoverageInfo();
final Collection children = childNode.getChildren();
for (Object child : children) {
final Object childValue = ((CoverageListNode)child).getValue();
PackageAnnotator.SummaryCoverageInfo childInfo = getSummaryCoverageForNodeValue(childValue);
info = JavaCoverageAnnotator.merge(info, childInfo);
}
coverageInformationString = JavaCoverageAnnotator.getCoverageInformationString(info, false);
}
return getNotCoveredMessage(coverageInformationString) + " in 'all classes in scope'";
}
示例2: checkNavigatable
import com.intellij.ide.util.treeView.AbstractTreeNode; //导入方法依赖的package包/类
private static boolean checkNavigatable(AbstractTreeNode<?> node) {
if (node.getValue() instanceof Navigatable && ((Navigatable)node.getValue()).canNavigate()) {
return true;
}
Collection<? extends AbstractTreeNode> children = node.getChildren();
for (AbstractTreeNode child : children) {
if (checkNavigatable(child)) {
return true;
}
}
return false;
}
示例3: traverseDepth
import com.intellij.ide.util.treeView.AbstractTreeNode; //导入方法依赖的package包/类
private static boolean traverseDepth(final AbstractTreeNode node, final TreeUtil.Traverse traverse) {
if (!traverse.accept(node)) return false;
final Collection<? extends AbstractTreeNode> children = node.getChildren();
for (AbstractTreeNode child : children) {
child.setParent(node);
if (!traverseDepth(child, traverse)) return false;
}
return true;
}
示例4: appendChildNodes
import com.intellij.ide.util.treeView.AbstractTreeNode; //导入方法依赖的package包/类
private void appendChildNodes(AbstractTreeNode node, TreeItem<Pair<AbstractUrl, String>> treeItem) {
final Collection<? extends AbstractTreeNode> children = node.getChildren();
for (AbstractTreeNode child : children) {
final TreeItem<Pair<AbstractUrl, String>> childTreeItem = new TreeItem<Pair<AbstractUrl, String>>(createPairForNode(child));
treeItem.addChild(childTreeItem);
appendChildNodes(child, childTreeItem);
}
}
示例5: getSelectPath
import com.intellij.ide.util.treeView.AbstractTreeNode; //导入方法依赖的package包/类
@Nullable
private static List<Object> getSelectPath(@NotNull Project project, @NotNull MvcFramework framework, VirtualFile file) {
if (file == null) {
return null;
}
final Module module = ModuleUtilCore.findModuleForFile(file, project);
if (module == null || !framework.hasSupport(module)) {
return null;
}
List<Object> result = new ArrayList<Object>();
final MvcProjectViewPane view = getView(project, framework);
if (view == null) {
return null;
}
final MvcProjectNode root = (MvcProjectNode)view.getTreeBuilder().getTreeStructure().getRootElement();
result.add(root);
for (AbstractTreeNode moduleNode : root.getChildren()) {
if (moduleNode.getValue() == module) {
result.add(moduleNode);
AbstractTreeNode<?> cur = moduleNode;
path:
while (true) {
for (AbstractTreeNode descriptor : cur.getChildren()) {
if (descriptor instanceof AbstractFolderNode) {
final AbstractFolderNode folderNode = (AbstractFolderNode)descriptor;
final VirtualFile dir = folderNode.getVirtualFile();
if (dir != null && VfsUtilCore.isAncestor(dir, file, false)) {
cur = folderNode;
result.add(folderNode);
if (dir.equals(file)) {
return result;
}
continue path;
}
}
if (descriptor instanceof AbstractMvcPsiNodeDescriptor) {
if (file.equals(((AbstractMvcPsiNodeDescriptor)descriptor).getVirtualFile())) {
result.add(descriptor);
return result;
}
}
}
return null;
}
}
}
return null;
}