org.eclipse.jdt.internal.formatter.comment
Class CommentFormatterUtil

java.lang.Object
  extended by org.eclipse.jdt.internal.formatter.comment.CommentFormatterUtil

public class CommentFormatterUtil
extends java.lang.Object

Comment formatting utils.

Since:
3.1

Constructor Summary
CommentFormatterUtil()
           
 
Method Summary
static java.lang.String evaluateFormatterEdit(java.lang.String string, org.eclipse.text.edits.TextEdit edit, org.eclipse.jface.text.Position[] positions)
          Evaluates the edit on the given string.
static org.eclipse.text.edits.TextEdit format2(int kind, java.lang.String string, int indentationLevel, java.lang.String lineSeparator, java.util.Map options)
          Creates edits that describe how to format the given string.
static void log(java.lang.Throwable t)
          Logs the given throwable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentFormatterUtil

public CommentFormatterUtil()
Method Detail

evaluateFormatterEdit

public static java.lang.String evaluateFormatterEdit(java.lang.String string,
                                                     org.eclipse.text.edits.TextEdit edit,
                                                     org.eclipse.jface.text.Position[] positions)
Evaluates the edit on the given string.

Throws:
java.lang.IllegalArgumentException - if the positions are not inside the string

format2

public static org.eclipse.text.edits.TextEdit format2(int kind,
                                                      java.lang.String string,
                                                      int indentationLevel,
                                                      java.lang.String lineSeparator,
                                                      java.util.Map options)
Creates edits that describe how to format the given string. Returns null if the code could not be formatted for the given kind.

Throws:
java.lang.IllegalArgumentException - if the offset and length are not inside the string

log

public static void log(java.lang.Throwable t)
Logs the given throwable.

Parameters:
t - the throwable
Since:
3.1