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