use of com.puppycrawl.tools.checkstyle.api.LineColumn in project checkstyle by checkstyle.
the class AbstractJavadocCheck method visitToken.
@Override
public final void visitToken(DetailAST blockCommentNode) {
if (JavadocUtil.isJavadocComment(blockCommentNode)) {
// store as field, to share with child Checks
context.get().blockCommentAst = blockCommentNode;
final LineColumn treeCacheKey = new LineColumn(blockCommentNode.getLineNo(), blockCommentNode.getColumnNo());
final ParseStatus result;
if (TREE_CACHE.get().containsKey(treeCacheKey)) {
result = TREE_CACHE.get().get(treeCacheKey);
} else {
result = context.get().parser.parseJavadocAsDetailNode(blockCommentNode);
TREE_CACHE.get().put(treeCacheKey, result);
}
if (result.getParseErrorMessage() == null) {
if (acceptJavadocWithNonTightHtml() || !result.isNonTight()) {
processTree(result.getTree());
}
if (violateExecutionOnNonTightHtml && result.isNonTight()) {
log(result.getFirstNonTightHtmlTag().getLine(), JavadocDetailNodeParser.MSG_UNCLOSED_HTML_TAG, result.getFirstNonTightHtmlTag().getText());
}
} else {
final ParseErrorMessage parseErrorMessage = result.getParseErrorMessage();
log(parseErrorMessage.getLineNumber(), parseErrorMessage.getMessageKey(), parseErrorMessage.getMessageArguments());
}
}
}
Aggregations