Package org.eclipse.lsp4j
Enum InsertTextFormat
- java.lang.Object
-
- java.lang.Enum<InsertTextFormat>
-
- org.eclipse.lsp4j.InsertTextFormat
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<InsertTextFormat>
public enum InsertTextFormat extends java.lang.Enum<InsertTextFormat>
Defines whether the insert text in a completion item should be interpreted as plain text or a snippet.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InsertTextFormatforValue(int value)intgetValue()static InsertTextFormatvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static InsertTextFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PlainText
public static final InsertTextFormat PlainText
The primary text to be inserted is treated as a plain string.
-
Snippet
public static final InsertTextFormat Snippet
The primary text to be inserted is treated as a snippet.A snippet can define tab stops and placeholders with `$1`, `$2` and `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of the snippet. Placeholders with equal identifiers are linked, that is typing in one will update others too.
-
-
Method Detail
-
values
public static InsertTextFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (InsertTextFormat c : InsertTextFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InsertTextFormat valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getValue
public int getValue()
-
forValue
public static InsertTextFormat forValue(int value)
-
-