Package org.eclipse.xtext.formatting2
Class FormatterPreferenceKeys
- java.lang.Object
-
- org.eclipse.xtext.formatting2.FormatterPreferenceKeys
-
public class FormatterPreferenceKeys extends java.lang.ObjectGeneral 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 StringKeyindentationThe characters used for one level of indentation.static IntegerKeyindentationLengthDeprecated.usetabWidthstatic StringKeylineSeparatorThe characters used to wrap lines.static IntegerKeymaxLineWidthThe maximum of characters that may fit into one line.static IntegerKeytabWidthThe 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\nor\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. Ifindentationis\tand the display-width of one tab is fours, then this values should be four. The formatter uses this value to compute whenmaxLineWidthhas been exceeded.
-
maxLineWidth
public static IntegerKey maxLineWidth
The maximum of characters that may fit into one line.
-
-