private boolean isCommentLine(IDocument document,int line) throws BadLocationException {
  if (document.getNumberOfLines() < line)   return false;
  int offset=document.getLineOffset(line);
  int length=document.getLineLength(line);
  int firstChar=findEndOfWhiteSpace(document,offset,offset + length);
  length-=firstChar - offset;
  String lineContents=document.get(firstChar,length);
  String prefix=lineContents.trim();
  if (!prefix.startsWith("*") || prefix.startsWith("*/")) {
    return false;
  }
  return true;
}

private boolean isCommentLine ( IDocument document , int line ) throws BadLocationException { if ( document . getNumberOfLines ( ) < line ) return false ; int offset = document . getLineOffset ( line ) ; int length = document . getLineLength ( line ) ; int firstChar = findEndOfWhiteSpace ( document , offset , offset + length ) ; length -= firstChar - offset ; String lineContents = document . get ( firstChar , length ) ; String prefix = lineContents . trim ( ) ; if ( ! prefix . startsWith ( "*" ) || prefix . startsWith ( "*/" ) ) { return false ; } return true ; }
returns true if the specified line is part of a paragraph and should be merged with the previous line .
