Package org.eclipse.xtext.formatting2
Class FormatterPreferenceKeys
- java.lang.Object
-
- org.eclipse.xtext.formatting2.FormatterPreferenceKeys
-
public class FormatterPreferenceKeys extends java.lang.Object
General preference keys used by this formatting infrastructure. Formatters based on this infrastructure should honor these keys as well.
To set a values for one of these keys, use
FormatterRequest.setPreferences(ITypedPreferenceValues)
.To access a value for one of these keys, use
AbstractFormatter2.getPreference(TypedPreferenceKey)
.To introduce new keys, subclass this class (see also
PreferenceKeysProvider.allConstantKeys(Class...)
.- Since:
- 2.8
- See Also:
TypedPreferenceValues
-
-
Field Summary
Fields Modifier and Type Field Description static StringKey
indentation
The characters used for one level of indentation.static IntegerKey
indentationLength
Deprecated.usetabWidth
static StringKey
lineSeparator
The characters used to wrap lines.static IntegerKey
maxLineWidth
The maximum of characters that may fit into one line.static IntegerKey
tabWidth
The display-width of one tab character.
-
Constructor Summary
Constructors Constructor Description FormatterPreferenceKeys()
-
-
-
Field Detail
-
lineSeparator
public static StringKey lineSeparator
The characters used to wrap lines. Usually\n
or\r\n
.
-
indentation
public static StringKey indentation
The characters used for one level of indentation. Usually "\t" or four spaces.
-
indentationLength
@Deprecated public static IntegerKey indentationLength
Deprecated.usetabWidth
-
tabWidth
public static IntegerKey tabWidth
The display-width of one tab character. Ifindentation
is\t
and the display-width of one tab is fours, then this values should be four. The formatter uses this value to compute whenmaxLineWidth
has been exceeded.
-
maxLineWidth
public static IntegerKey maxLineWidth
The maximum of characters that may fit into one line.
-
-