equal
deleted
inserted
replaced
29 import java.io.InputStream; |
29 import java.io.InputStream; |
30 |
30 |
31 import javax.tools.FileObject; |
31 import javax.tools.FileObject; |
32 |
32 |
33 import com.sun.javadoc.*; |
33 import com.sun.javadoc.*; |
|
34 import com.sun.source.util.TreePath; |
34 import com.sun.tools.javac.code.Attribute; |
35 import com.sun.tools.javac.code.Attribute; |
35 import com.sun.tools.javac.code.Scope; |
36 import com.sun.tools.javac.code.Scope; |
36 import com.sun.tools.javac.code.Symbol.ClassSymbol; |
37 import com.sun.tools.javac.code.Symbol.ClassSymbol; |
37 import com.sun.tools.javac.code.Symbol.PackageSymbol; |
38 import com.sun.tools.javac.code.Symbol.PackageSymbol; |
38 import com.sun.tools.javac.tree.JCTree; |
39 import com.sun.tools.javac.tree.JCTree; |
73 |
74 |
74 /** |
75 /** |
75 * Constructor |
76 * Constructor |
76 */ |
77 */ |
77 public PackageDocImpl(DocEnv env, PackageSymbol sym) { |
78 public PackageDocImpl(DocEnv env, PackageSymbol sym) { |
78 this(env, sym, null, null); |
79 this(env, sym, null); |
79 } |
80 } |
80 |
81 |
81 /** |
82 /** |
82 * Constructor |
83 * Constructor |
83 */ |
84 */ |
84 public PackageDocImpl(DocEnv env, PackageSymbol sym, |
85 public PackageDocImpl(DocEnv env, PackageSymbol sym, TreePath treePath) { |
85 String documentation, JCTree tree) { |
86 super(env, treePath); |
86 super(env, documentation); |
|
87 this.sym = sym; |
87 this.sym = sym; |
88 this.tree = (JCCompilationUnit) tree; |
88 this.tree = (treePath == null) ? null : (JCCompilationUnit) treePath.getCompilationUnit(); |
89 foundDoc = (documentation != null); |
89 foundDoc = (documentation != null); |
90 } |
90 } |
91 |
91 |
92 void setTree(JCTree tree) { |
92 void setTree(JCTree tree) { |
93 this.tree = (JCCompilationUnit) tree; |
93 this.tree = (JCCompilationUnit) tree; |
94 } |
94 } |
95 |
95 |
96 public void setRawCommentText(String rawDocumentation) { |
96 public void setTreePath(TreePath treePath) { |
97 super.setRawCommentText(rawDocumentation); |
97 super.setTreePath(treePath); |
98 checkDoc(); |
98 checkDoc(); |
99 } |
99 } |
100 |
100 |
101 /** |
101 /** |
102 * Do lazy initialization of "documentation" string. |
102 * Do lazy initialization of "documentation" string. |