equal
deleted
inserted
replaced
25 |
25 |
26 package com.sun.tools.javadoc; |
26 package com.sun.tools.javadoc; |
27 |
27 |
28 import javax.tools.JavaFileObject; |
28 import javax.tools.JavaFileObject; |
29 |
29 |
|
30 import com.sun.source.util.TreePath; |
30 import com.sun.tools.javac.code.Kinds; |
31 import com.sun.tools.javac.code.Kinds; |
31 import com.sun.tools.javac.code.Symbol.*; |
32 import com.sun.tools.javac.code.Symbol.*; |
32 import com.sun.tools.javac.comp.Enter; |
33 import com.sun.tools.javac.comp.Enter; |
33 import com.sun.tools.javac.tree.JCTree.*; |
34 import com.sun.tools.javac.tree.JCTree.*; |
34 import com.sun.tools.javac.util.Context; |
35 import com.sun.tools.javac.util.Context; |
82 |
83 |
83 @Override |
84 @Override |
84 public void visitTopLevel(JCCompilationUnit tree) { |
85 public void visitTopLevel(JCCompilationUnit tree) { |
85 super.visitTopLevel(tree); |
86 super.visitTopLevel(tree); |
86 if (tree.sourcefile.isNameCompatible("package-info", JavaFileObject.Kind.SOURCE)) { |
87 if (tree.sourcefile.isNameCompatible("package-info", JavaFileObject.Kind.SOURCE)) { |
87 docenv.makePackageDoc(tree.packge, docenv.getTreePath(tree)); |
88 JCPackageDecl pd = tree.getPackage(); |
|
89 TreePath tp = pd == null ? docenv.getTreePath(tree) : docenv.getTreePath(tree, pd); |
|
90 docenv.makePackageDoc(tree.packge, tp); |
88 } |
91 } |
89 } |
92 } |
90 |
93 |
91 @Override |
94 @Override |
92 public void visitClassDef(JCClassDecl tree) { |
95 public void visitClassDef(JCClassDecl tree) { |