public boolean isValidCategory(final @NotNull PsiElement element, @NotNull String category) {
    final RegExpLanguageHost host = findRegExpHost(element);
    return host != null ? host.isValidCategory(category) : myDefaultProvider.isValidCategory(category);
  }
public boolean isValidCategory(final @NotNull PsiElement element, @NotNull String category)