public class Formatter
extends org.eclipse.jdt.core.formatter.CodeFormatter
CodeFormatter that applies Spring formatting conventions.| Constructor and Description |
|---|
Formatter()
Create a new formatter instance.
|
Formatter(FormatterOption... options)
Create a new formatter instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createIndentationString(int indentationLevel) |
org.eclipse.text.edits.TextEdit |
format(int kind,
String source,
int offset,
int length,
int indentationLevel,
String lineSeparator) |
org.eclipse.text.edits.TextEdit |
format(int kind,
String source,
org.eclipse.jface.text.IRegion[] regions,
int indentationLevel,
String lineSeparator) |
org.eclipse.text.edits.TextEdit |
format(String source)
Format the given source content.
|
org.eclipse.text.edits.TextEdit |
format(String source,
int offset,
int length)
Format a specific subsection of the given source content.
|
org.eclipse.text.edits.TextEdit |
format(String source,
org.eclipse.jface.text.IRegion[] regions)
Format specific subsections of the given source content.
|
void |
setOptions(Map<String,String> options) |
public Formatter()
public Formatter(FormatterOption... options)
options - formatter optionspublic org.eclipse.text.edits.TextEdit format(String source)
source - the source content to formatpublic org.eclipse.text.edits.TextEdit format(String source, int offset, int length)
source - the source content to formatoffset - the offset to start formattinglength - the length to formatpublic org.eclipse.text.edits.TextEdit format(int kind,
String source,
int offset,
int length,
int indentationLevel,
String lineSeparator)
format in class org.eclipse.jdt.core.formatter.CodeFormatterpublic org.eclipse.text.edits.TextEdit format(String source, org.eclipse.jface.text.IRegion[] regions)
source - the source content to formatregions - the regions to formatpublic org.eclipse.text.edits.TextEdit format(int kind,
String source,
org.eclipse.jface.text.IRegion[] regions,
int indentationLevel,
String lineSeparator)
format in class org.eclipse.jdt.core.formatter.CodeFormatterpublic String createIndentationString(int indentationLevel)
createIndentationString in class org.eclipse.jdt.core.formatter.CodeFormatterCopyright © 2019. All rights reserved.