mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Comment adjustments.
This commit is contained in:
parent
d45340dc7d
commit
884ac50002
1 changed files with 21 additions and 21 deletions
|
@ -21,7 +21,6 @@ import org.eclipse.text.edits.TextEdit;
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public abstract class CodeFormatter {
|
public abstract class CodeFormatter {
|
||||||
|
|
||||||
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,11 +65,11 @@ public abstract class CodeFormatter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format <code>source</code>,
|
* Format <code>source</code>,
|
||||||
* and returns a text edit that correspond to the difference between the given string and the formatted string.
|
* and returns a text edit that correspond to the difference between the given string and
|
||||||
* It returns null if the given string cannot be formatted.
|
* 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
|
* If the offset position is matching a whitespace, the result can include whitespaces.
|
||||||
* caller to get rid of preceeding 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:
|
* @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
|
* K_EXPRESSION, K_STATEMENTS, K_CLASS_BODY_DECLARATIONS, K_TRANSLATION_UNIT, K_UNKNOWN
|
||||||
|
@ -86,7 +85,8 @@ public abstract class CodeFormatter {
|
||||||
* @throws IllegalArgumentException if offset is lower than 0, length is lower than 0 or
|
* @throws IllegalArgumentException if offset is lower than 0, length is lower than 0 or
|
||||||
* length is greater than source length.
|
* 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
|
* @param options - general formatter options
|
||||||
|
@ -94,9 +94,9 @@ public abstract class CodeFormatter {
|
||||||
public abstract void setOptions(Map<String, ?> options);
|
public abstract void setOptions(Map<String, ?> options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Answers the string that corresponds to the indentation to the given indentation level or an empty string
|
* Answers the string that corresponds to the indentation to the given indentation level,
|
||||||
* if the indentation cannot be computed.
|
* or an empty string if the indentation cannot be computed.
|
||||||
* <p>This method needs to be overriden in a subclass.</p>
|
* <p>This method needs to be overridden in a subclass.</p>
|
||||||
*
|
*
|
||||||
* <p>The default implementation returns an empty string.</p>
|
* <p>The default implementation returns an empty string.</p>
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue