/** * Report the location of a block comment. * @param startLineNo the starting line number * @param startColNo the starting column number * @param endLineNo the ending line number * @param endColNo the ending column number **/ private void reportBlockComment(int startLineNo, int startColNo, int endLineNo, int endColNo) { final String[] cComment = extractBlockComment(startLineNo, startColNo, endLineNo, endColNo); final Comment comment = new Comment(cComment, startColNo, endLineNo, endColNo); // save the comment if (clangComments.containsKey(startLineNo)) { final List<TextBlock> entries = clangComments.get(startLineNo); entries.add(comment); } else { final List<TextBlock> entries = new ArrayList<>(); entries.add(comment); clangComments.put(startLineNo, entries); } // Remember if possible Javadoc comment final String firstLine = line(startLineNo - 1); if (firstLine.contains("/**") && !firstLine.contains("/**/")) { javadocComments.put(endLineNo - 1, comment); } }
/** * Report the location of a block comment. * @param startLineNo the starting line number * @param startColNo the starting column number * @param endLineNo the ending line number * @param endColNo the ending column number **/ private void reportBlockComment(int startLineNo, int startColNo, int endLineNo, int endColNo) { final String[] cComment = extractBlockComment(startLineNo, startColNo, endLineNo, endColNo); final Comment comment = new Comment(cComment, startColNo, endLineNo, endColNo); // save the comment if (clangComments.containsKey(startLineNo)) { final List<TextBlock> entries = clangComments.get(startLineNo); entries.add(comment); } else { final List<TextBlock> entries = new ArrayList<>(); entries.add(comment); clangComments.put(startLineNo, entries); } // Remember if possible Javadoc comment final String firstLine = line(startLineNo - 1); if (firstLine.contains("/**") && !firstLine.contains("/**/")) { javadocComments.put(endLineNo - 1, comment); } }