Package org.eclipse.jdt.core
Interface ICodeFormatter
-
public interface ICodeFormatter
Deprecated.UseCodeFormatter
instead (note: options have changed)Specification for a generic source code formatter. Client plug-ins can contribute an implementation for an ICodeFormatter, through the extension point "org.eclipse.jdt.core.codeFormatter". In case none is found, a default formatter can be provided through the ToolFactory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String
format(String string, int indentationLevel, int[] positions, String lineSeparator)
Deprecated.Formats the StringsourceString
, and returns a string containing the formatted version.
-
-
-
Method Detail
-
format
String format(String string, int indentationLevel, int[] positions, String lineSeparator)
Deprecated.Formats the StringsourceString
, and returns a string containing the formatted version.- Parameters:
string
- the string to formatindentationLevel
- the initial indentation level, used to shift left/right the entire source fragment. An initial indentation level of zero has no effect.positions
- an array of positions to map. These are character-based source positions inside the original source, arranged in non-decreasing order, for which corresponding positions in the formatted source will be computed (so as to relocate elements associated with the original source). It updates the positions array with updated positions. If set tonull
, then no positions are mapped.lineSeparator
- the line separator to use in formatted source, if set tonull
, then the platform default one will be used.- Returns:
- the formatted output string.
-
-