From 884ac50002ae181f0abfd1a23a8643280f964011 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 27 Mar 2011 04:47:13 +0000 Subject: [PATCH] Comment adjustments. --- .../cdt/core/formatter/CodeFormatter.java | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/CodeFormatter.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/CodeFormatter.java index 79383539ee8..0ad5f9b5e16 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/CodeFormatter.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/formatter/CodeFormatter.java @@ -21,8 +21,7 @@ import org.eclipse.text.edits.TextEdit; * @since 3.0 */ public abstract class CodeFormatter { - - public static final String EMPTY_STRING = ""; //$NON-NLS-1$ + public static final String EMPTY_STRING = ""; //$NON-NLS-1$ /** * Unknown kind. @@ -66,11 +65,11 @@ public abstract class CodeFormatter { /** * Format source, - * and returns a text edit that correspond to the difference between the given string and the formatted string. - * It returns null if the given string cannot be formatted. + * and returns a text edit that correspond to the difference between the given string and + * the formatted string. It returns null if the given string cannot be formatted. * - * If the offset position is matching a whitespace, the result can include whitespaces. It would be up to the - * caller to get rid of preceeding whitespaces. + * If the offset position is matching a whitespace, the result can include whitespaces. + * It would be up to the caller to get rid of preceding whitespaces. * * @param kind Use to specify the kind of the code snippet to format. It can be any of these: * K_EXPRESSION, K_STATEMENTS, K_CLASS_BODY_DECLARATIONS, K_TRANSLATION_UNIT, K_UNKNOWN @@ -86,25 +85,26 @@ public abstract class CodeFormatter { * @throws IllegalArgumentException if offset is lower than 0, length is lower than 0 or * length is greater than source length. */ - public abstract TextEdit format(int kind, String source, int offset, int length, int indentationLevel, String lineSeparator); + public abstract TextEdit format(int kind, String source, int offset, int length, + int indentationLevel, String lineSeparator); /** * @param options - general formatter options */ public abstract void setOptions(Map options); - /** - * Answers the string that corresponds to the indentation to the given indentation level or an empty string - * if the indentation cannot be computed. - *

This method needs to be overriden in a subclass.

- * - *

The default implementation returns an empty string.

- * - * @param indentationLevel the given indentation level - * @return the string corresponding to the right indentation level - * @exception IllegalArgumentException if the given indentation level is lower than zero - */ - public String createIndentationString(int indentationLevel) { - return EMPTY_STRING; - } + /** + * Answers the string that corresponds to the indentation to the given indentation level, + * or an empty string if the indentation cannot be computed. + *

This method needs to be overridden in a subclass.

+ * + *

The default implementation returns an empty string.

+ * + * @param indentationLevel the given indentation level + * @return the string corresponding to the right indentation level + * @exception IllegalArgumentException if the given indentation level is lower than zero + */ + public String createIndentationString(int indentationLevel) { + return EMPTY_STRING; + } }