Enum 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.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      PlainText
      The primary text to be inserted is treated as a plain string.
      Snippet
      The primary text to be inserted is treated as a snippet.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static InsertTextFormat forValue​(int value)  
      int getValue()  
      static InsertTextFormat valueOf​(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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 name
        java.lang.NullPointerException - if the argument is null
      • getValue

        public int getValue()