Field Class Doc In Tree | 导航树上显示字段类注释
This commit is contained in:
@@ -90,7 +90,15 @@ public class Tree implements ProjectViewNodeDecorator {
|
|||||||
if (node instanceof PsiFieldNode) {
|
if (node instanceof PsiFieldNode) {
|
||||||
// On Show Members
|
// On Show Members
|
||||||
PsiField psiField = ((PsiFieldNode) node).getValue();
|
PsiField psiField = ((PsiFieldNode) node).getValue();
|
||||||
return OwnerToPsiDocUtils.srcOrByteCodeDoc(psiField);
|
PsiDocComment docComment = OwnerToPsiDocUtils.srcOrByteCodeDoc(psiField);
|
||||||
|
if (docComment != null) {
|
||||||
|
return docComment;
|
||||||
|
}
|
||||||
|
PsiClass psiClass = psiField.getContainingClass();
|
||||||
|
if (psiClass != null) {
|
||||||
|
return OwnerToPsiDocUtils.srcOrByteCodeDoc(psiClass);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node instanceof ClassTreeNode) {
|
if (node instanceof ClassTreeNode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user