类 BracePair

java.lang.Object
com.intellij.lang.BracePair

public class BracePair extends Object
Defines a single pair of braces which need to be matched when editing code in a custom language.
另请参阅:
  • 构造器详细资料

    • BracePair

      public BracePair(IElementType leftBrace, IElementType rightBrace, boolean structural)
      Creates a new brace pair instance.
      参数:
      leftBrace - the lexer token type for the left brace in the pair.
      rightBrace - the lexer token type for the right brace in the pair.
      structural - if true, the brace is considered structural (see isStructural() for details)
  • 方法详细资料

    • getLeftBraceType

      public IElementType getLeftBraceType()
      Returns the lexer token type for the left brace in the pair.
      返回:
      token type
    • getRightBraceType

      public IElementType getRightBraceType()
      Returns the lexer token type for the right brace in the pair.
      返回:
      token type
    • isStructural

      public boolean isStructural()
      Returns true if the brace is structural. Structural braces have higher priority than regular braces: they are matched with each other even if there are unmatched braces of other types between them, and an opening non-structural brace is not matched with a closing one if one of them is outside a pair of matched structural braces and another is outside. In Java code, the curly braces are structural.
      返回:
      true if the brace is structural, false otherwise.
    • toString

      @NonNls public @NonNls String toString()
      覆盖:
      toString 在类中 Object