IElementType (final @NotNull IElementType type) { PairedBraceMatcher matcher = getPairedBraceMatcher(type); if (matcher != null) { BracePair[] pairs = matcher.getPairs(); for (BracePair pair : pairs) { if (pair.getLeftBraceType() == type ) return pair.getRightBraceType(); if (pair.getRightBraceType() == type ) return pair.getLeftBraceType(); } } return null; }