use of com.android.tools.idea.editors.hprof.views.nodedata.HeapNode in project android by JetBrains.
the class ClassesTreeView method getTargetFiles.
@Nullable
private PsiClassNavigation[] getTargetFiles() {
TreePath path = myTree.getSelectionPath();
if (path.getPathCount() < 2) {
return null;
}
assert path.getLastPathComponent() instanceof HeapNode;
HeapNode node = (HeapNode) path.getLastPathComponent();
if (node instanceof HeapClassObjNode) {
ClassObj classObj = ((HeapClassObjNode) node).getClassObj();
String className = classObj.getClassName();
int arrayIndex = className.indexOf("[");
if (arrayIndex >= 0) {
className = className.substring(0, arrayIndex);
}
return PsiClassNavigation.getNavigationForClass(myProject, className);
}
return null;
}
use of com.android.tools.idea.editors.hprof.views.nodedata.HeapNode in project android by JetBrains.
the class ClassesTreeView method sortTree.
private void sortTree(@NotNull HeapPackageNode parent) {
if (parent.isLeaf() || myComparator == null) {
return;
}
List<HeapNode> children = parent.getChildren();
Collections.sort(children, myComparator);
for (HeapNode child : children) {
if (child instanceof HeapPackageNode) {
sortTree((HeapPackageNode) child);
}
}
}
Aggregations