本文整理汇总了Java中com.intellij.ide.util.treeView.NodeDescriptor.getParentDescriptor方法的典型用法代码示例。如果您正苦于以下问题:Java NodeDescriptor.getParentDescriptor方法的具体用法?Java NodeDescriptor.getParentDescriptor怎么用?Java NodeDescriptor.getParentDescriptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.util.treeView.NodeDescriptor
的用法示例。
在下文中一共展示了NodeDescriptor.getParentDescriptor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isAutoExpandNode
import com.intellij.ide.util.treeView.NodeDescriptor; //导入方法依赖的package包/类
@Override
protected boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
if (nodeDescriptor.getElement() instanceof RootFileElement) {
return true;
}
else if (!SystemInfo.isWindows) {
NodeDescriptor parent = nodeDescriptor.getParentDescriptor();
return parent != null && parent.getElement() instanceof RootFileElement;
}
return false;
}
示例2: isAutoExpandNode
import com.intellij.ide.util.treeView.NodeDescriptor; //导入方法依赖的package包/类
@Override
protected final boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
StructureViewModel model = myStructureModel;
if (model instanceof TreeModelWrapper) {
model = ((TreeModelWrapper) model).getModel();
}
if (model instanceof StructureViewModel.ExpandInfoProvider) {
StructureViewModel.ExpandInfoProvider provider = (StructureViewModel.ExpandInfoProvider)model;
Object element = nodeDescriptor.getElement();
if (element instanceof StructureViewComponent.StructureViewTreeElementWrapper) {
StructureViewComponent.StructureViewTreeElementWrapper wrapper = (StructureViewComponent.StructureViewTreeElementWrapper)element;
if (wrapper.getValue() instanceof StructureViewTreeElement) {
final StructureViewTreeElement value = (StructureViewTreeElement)wrapper.getValue();
if (value != null) {
return provider.isAutoExpand(value);
}
}
} else if (element instanceof GroupWrapper) {
final Group group = ((GroupWrapper)element).getValue();
for (TreeElement treeElement : group.getChildren()) {
if (treeElement instanceof StructureViewTreeElement && !provider.isAutoExpand((StructureViewTreeElement)treeElement)) {
return false;
}
}
}
}
// expand root node & its immediate children
final NodeDescriptor parent = nodeDescriptor.getParentDescriptor();
return super.isAutoExpandNode(parent == null ? nodeDescriptor : parent);
}
示例3: isAutoExpandNode
import com.intellij.ide.util.treeView.NodeDescriptor; //导入方法依赖的package包/类
protected boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
return nodeDescriptor.getParentDescriptor() == null || nodeDescriptor.getElement() instanceof GroupingElement;
}
示例4: isAutoExpandNode
import com.intellij.ide.util.treeView.NodeDescriptor; //导入方法依赖的package包/类
@Override
protected boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
return nodeDescriptor.getParentDescriptor() == null;
}
示例5: isAutoExpandNode
import com.intellij.ide.util.treeView.NodeDescriptor; //导入方法依赖的package包/类
@Override
protected boolean isAutoExpandNode(NodeDescriptor nodeDescriptor) {
return nodeDescriptor.getParentDescriptor() == null || ((AbstractTreeNode)nodeDescriptor).isAlwaysExpand();
}