Top Description Fields Constructors Methods
org.eclipse.lsp4j

public Class FormattingOptions

extends LinkedHashMap<String, Either3<String, Number, Boolean>>
Class Inheritance
Annotations
@SuppressWarnings:all
Imports
java.io.Serializable, java.util.Collections, .LinkedHashMap, .Map, .Set, org.eclipse.lsp4j.jsonrpc.messages.Either3

Value-object describing what options formatting should use.

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public
public
FormattingOptions(final int tabSize, final boolean insertSpaces)

public
FormattingOptions(final int tabSize, final boolean insertSpaces, final Map<String, String> properties)
Deprecated See https://github.com/eclipse-lsp4j/lsp4j/issues/99

Method Summary

Modifier and TypeMethod and Description
public Boolean
getBoolean(final String key)

public Number
getNumber(final String key)

public Map<String, String>
getProperties()
Deprecated See https://github.com/eclipse-lsp4j/lsp4j/issues/99

public String
getString(final String key)

public int
getTabSize()

Size of a tab in spaces.

public boolean
isInsertFinalNewline()

Insert a newline character at the end of the file if one does not exist.

public boolean
isInsertSpaces()

Prefer spaces over tabs.

public boolean
isTrimFinalNewlines()

Trim all newlines after the final newline at the end of the file.

public boolean
isTrimTrailingWhitespace()

Trim trailing whitespace on a line.

public void
putBoolean(final String key, final Boolean value)

public void
putNumber(final String key, final Number value)

public void
putString(final String key, final String value)

public void
setInsertFinalNewline(final boolean insertFinalNewline)

public void
setInsertSpaces(final boolean insertSpaces)

public void
setProperties(final Map<String, String> properties)
Deprecated See https://github.com/eclipse-lsp4j/lsp4j/issues/99

public void
setTabSize(final int tabSize)

public void
setTrimFinalNewlines(final boolean trimFinalNewlines)

public void
setTrimTrailingWhitespace(final boolean trimTrailingWhitespace)

Inherited from java.util.LinkedHashMap:
clearcontainsValueentrySetforEachgetgetOrDefaultkeySetnewLinkedHashMapputFirstputLastremoveEldestEntryreplaceAllreversedsequencedEntrySetsequencedKeySetsequencedValuesvalues

Field Detail

INSERT_FINAL_NEWLINEback to summary
private static final String INSERT_FINAL_NEWLINE
INSERT_SPACESback to summary
private static final String INSERT_SPACES
TAB_SIZEback to summary
private static final String TAB_SIZE
TRIM_FINAL_NEWLINESback to summary
private static final String TRIM_FINAL_NEWLINES
TRIM_TRAILING_WHITESPACEback to summary
private static final String TRIM_TRAILING_WHITESPACE

Constructor Detail

FormattingOptionsback to summary
public FormattingOptions()
FormattingOptionsback to summary
public FormattingOptions(final int tabSize, final boolean insertSpaces)
FormattingOptionsback to summary
public FormattingOptions(final int tabSize, final boolean insertSpaces, final Map<String, String> properties)

Deprecated

See https://github.com/eclipse-lsp4j/lsp4j/issues/99

Annotations
@Deprecated

Method Detail

getBooleanback to summary
public Boolean getBoolean(final String key)
getNumberback to summary
public Number getNumber(final String key)
getPropertiesback to summary
public Map<String, String> getProperties()

Deprecated

See https://github.com/eclipse-lsp4j/lsp4j/issues/99

Annotations
@Deprecated
getStringback to summary
public String getString(final String key)
getTabSizeback to summary
public int getTabSize()

Size of a tab in spaces.

isInsertFinalNewlineback to summary
public boolean isInsertFinalNewline()

Insert a newline character at the end of the file if one does not exist.

Since 3.15.0

isInsertSpacesback to summary
public boolean isInsertSpaces()

Prefer spaces over tabs.

isTrimFinalNewlinesback to summary
public boolean isTrimFinalNewlines()

Trim all newlines after the final newline at the end of the file.

Since 3.15.0

isTrimTrailingWhitespaceback to summary
public boolean isTrimTrailingWhitespace()

Trim trailing whitespace on a line.

Since 3.15.0

putBooleanback to summary
public void putBoolean(final String key, final Boolean value)
putNumberback to summary
public void putNumber(final String key, final Number value)
putStringback to summary
public void putString(final String key, final String value)
setInsertFinalNewlineback to summary
public void setInsertFinalNewline(final boolean insertFinalNewline)
setInsertSpacesback to summary
public void setInsertSpaces(final boolean insertSpaces)
setPropertiesback to summary
public void setProperties(final Map<String, String> properties)

Deprecated

See https://github.com/eclipse-lsp4j/lsp4j/issues/99

Annotations
@Deprecated
setTabSizeback to summary
public void setTabSize(final int tabSize)
setTrimFinalNewlinesback to summary
public void setTrimFinalNewlines(final boolean trimFinalNewlines)
setTrimTrailingWhitespaceback to summary
public void setTrimTrailingWhitespace(final boolean trimTrailingWhitespace)