@Override
  protected boolean isEndBlockToken(@Nullable PsiElement element) {
    return element instanceof PsiJavaToken && ((PsiJavaToken)element).getTokenType() == JavaTokenType.RBRACE;
  }
@Override
  protected boolean isEndBlockToken(@Nullable PsiElement element)