langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/CommentHelper.java
changeset 39364 bd6d4a7936b4
parent 35426 374342e56a56
child 40606 eb2c81860c86
equal deleted inserted replaced
39363:ebaee646b121 39364:bd6d4a7936b4
   146         if (path == null) {
   146         if (path == null) {
   147             TypeMirror symbol = c.utils.getSymbol(rtree.getSignature());
   147             TypeMirror symbol = c.utils.getSymbol(rtree.getSignature());
   148             if (symbol == null) {
   148             if (symbol == null) {
   149                 return null;
   149                 return null;
   150             }
   150             }
   151             return  c.root.getTypeUtils().asElement(symbol);
   151             return  c.docEnv.getTypeUtils().asElement(symbol);
   152         }
   152         }
   153         // case A: the element contains no comments associated and
   153         // case A: the element contains no comments associated and
   154         // the comments need to be copied from ancestor
   154         // the comments need to be copied from ancestor
   155         // case B: the element has @inheritDoc, then the ancestral comment
   155         // case B: the element has @inheritDoc, then the ancestral comment
   156         // as appropriate has to be copied over.
   156         // as appropriate has to be copied over.
   170                 CommentHelper ovch = c.utils.getCommentHelper(overriddenElement);
   170                 CommentHelper ovch = c.utils.getCommentHelper(overriddenElement);
   171                 return ovch.getElement(c, rtree);
   171                 return ovch.getElement(c, rtree);
   172             }
   172             }
   173             return null;
   173             return null;
   174         }
   174         }
   175         DocTrees doctrees = c.root.getDocTrees();
   175         DocTrees doctrees = c.docEnv.getDocTrees();
   176         return doctrees.getElement(docTreePath);
   176         return doctrees.getElement(docTreePath);
   177     }
   177     }
   178 
   178 
   179     public Element getException(Configuration c, DocTree dtree) {
   179     public Element getException(Configuration c, DocTree dtree) {
   180         if (dtree.getKind() == THROWS || dtree.getKind() == EXCEPTION) {
   180         if (dtree.getKind() == THROWS || dtree.getKind() == EXCEPTION) {
   417         }
   417         }
   418         return null;
   418         return null;
   419     }
   419     }
   420 
   420 
   421     public List<? extends DocTree> getFirstSentenceTrees(Configuration c, List<? extends DocTree> body) {
   421     public List<? extends DocTree> getFirstSentenceTrees(Configuration c, List<? extends DocTree> body) {
   422         List<DocTree> firstSentence = c.root.getDocTrees().getFirstSentence(body);
   422         List<DocTree> firstSentence = c.docEnv.getDocTrees().getFirstSentence(body);
   423         return firstSentence;
   423         return firstSentence;
   424     }
   424     }
   425 
   425 
   426     public List<? extends DocTree> getFirstSentenceTrees(Configuration c, DocTree dtree) {
   426     public List<? extends DocTree> getFirstSentenceTrees(Configuration c, DocTree dtree) {
   427         return getFirstSentenceTrees(c, getBody(c, dtree));
   427         return getFirstSentenceTrees(c, getBody(c, dtree));