/** * Return the comment header. * * @return the comment header */ public List<String> getHeader() { return storage.getHeader(); }
/** * Return the comment header. * * @return the comment header */ public List<String> getHeader() { return storage.getHeader(); }
/** * Return the comment header. * * @return the comment header */ public List<String> getHeader() { return storage.getHeader(); }
/** * Checks if parts of the passed in comment can be used as header comment. * This method checks whether a header comment can be defined (i.e. whether * this is the first comment in the loaded file). If this is the case, it is * searched for the lates blank line. This line will mark the end of the * header comment. The return value is the index of the first line in the * passed in list, which does not belong to the header comment. * * @param commentLines the comment lines * @return the index of the next line after the header comment */ private int checkHeaderComment(List<String> commentLines) { if (getHeader() == null && layout.isEmpty()) { // This is the first comment. Search for blank lines. int index = commentLines.size() - 1; while (index >= 0 && commentLines.get(index).length() > 0) { index--; } setHeader(new ArrayList<String>(commentLines.subList(0, index + 1))); return index + 1; } else { return 0; } }
/** * Checks if parts of the passed in comment can be used as header comment. * This method checks whether a header comment can be defined (i.e. whether * this is the first comment in the loaded file). If this is the case, it is * searched for the lates blank line. This line will mark the end of the * header comment. The return value is the index of the first line in the * passed in list, which does not belong to the header comment. * * @param commentLines the comment lines * @return the index of the next line after the header comment */ private int checkHeaderComment(List<String> commentLines) { if (getHeader() == null && layout.isEmpty()) { // This is the first comment. Search for blank lines. int index = commentLines.size() - 1; while (index >= 0 && commentLines.get(index).length() > 0) { index--; } setHeader(new ArrayList<String>(commentLines.subList(0, index + 1))); return index + 1; } else { return 0; } }
/** * Checks if parts of the passed in comment can be used as header comment. * This method checks whether a header comment can be defined (i.e. whether * this is the first comment in the loaded file). If this is the case, it is * searched for the lates blank line. This line will mark the end of the * header comment. The return value is the index of the first line in the * passed in list, which does not belong to the header comment. * * @param commentLines the comment lines * @return the index of the next line after the header comment */ private int checkHeaderComment(List<String> commentLines) { if (getHeader() == null && layout.isEmpty()) { // This is the first comment. Search for blank lines. int index = commentLines.size() - 1; while (index >= 0 && commentLines.get(index).length() > 0) { index--; } setHeader(new ArrayList<String>(commentLines.subList(0, index + 1))); return index + 1; } else { return 0; } }
/** * Checks if parts of the passed in comment can be used as header comment. * This method checks whether a header comment can be defined (i.e. whether * this is the first comment in the loaded file). If this is the case, it is * searched for the lates blank line. This line will mark the end of the * header comment. The return value is the index of the first line in the * passed in list, which does not belong to the header comment. * * @param commentLines the comment lines * @return the index of the next line after the header comment */ private int checkHeaderComment(List<String> commentLines) { if (getHeader() == null && layout.isEmpty()) { // This is the first comment. Search for blank lines. int index = commentLines.size() - 1; while (index >= 0 && commentLines.get(index).length() > 0) { index--; } setHeader(new ArrayList<String>(commentLines.subList(0, index + 1))); return index + 1; } else { return 0; } }