Package org.aspectj.org.eclipse.jdt.internal.formatter.comment

Examples of org.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentRegion


   * @since 3.1
   */
  public static CommentRegion createRegion(int kind, IDocument document, Position range, CodeFormatterVisitor formatter) {
    switch (kind) {
      case CodeFormatter.K_SINGLE_LINE_COMMENT:
        return new CommentRegion(document, range, formatter);
      case CodeFormatter.K_MULTI_LINE_COMMENT:
        return new MultiCommentRegion(document, range, formatter);
      case CodeFormatter.K_JAVA_DOC:
        return new JavaDocRegion(document, range, formatter);
    }
View Full Code Here


      } else {
        this.preferences.line_separator = Util.LINE_SEPARATOR;
      }
      this.preferences.initial_indentation_level = indentationLevel;
      this.newCodeFormatter = new CodeFormatterVisitor(this.preferences, this.options, offset, length, null);
      final CommentRegion region = createRegion(kind, new Document(source), new Position(offset, length), this.newCodeFormatter);
      if (region != null) {
        return this.newCodeFormatter.format(source, region);
      }
    }
    return new MultiTextEdit();
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentRegion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.