Enum InsertTextMode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<InsertTextMode>

    public enum InsertTextMode
    extends java.lang.Enum<InsertTextMode>
    How whitespace and indentation is handled during completion item insertion.

    Since 3.16.0

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AdjustIndentation
      The editor adjusts leading whitespace of new lines so that they match the indentation up to the cursor of the line for which the item is accepted.
      AsIs
      The insertion or replace strings is taken as it is.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static InsertTextMode forValue​(int value)  
      int getValue()  
      static InsertTextMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static InsertTextMode[] 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

      • AsIs

        public static final InsertTextMode AsIs
        The insertion or replace strings is taken as it is. If the value is multi line the lines below the cursor will be inserted using the indentation defined in the string value. The client will not apply any kind of adjustments to the string.
      • AdjustIndentation

        public static final InsertTextMode AdjustIndentation
        The editor adjusts leading whitespace of new lines so that they match the indentation up to the cursor of the line for which the item is accepted.

        Consider a line like this: [2tabs][cursor][3tabs]foo. Accepting a multi line completion item is indented using 2 tabs and all following lines inserted will be indented using 2 tabs as well.

    • Method Detail

      • values

        public static InsertTextMode[] 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 (InsertTextMode c : InsertTextMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static InsertTextMode 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()