WEB-25750 Intentions: restore "Check RegExp" action

This commit is contained in:
Maxim Kropotov
2017-03-06 14:29:59 +03:00
parent 9aa4667e35
commit 42ec749064
3 changed files with 9 additions and 0 deletions
@@ -56,6 +56,11 @@ public abstract class AbstractLanguageInjectionSupport extends LanguageInjection
return false;
}
@Override
public boolean useDefaultCommentInjector() {
return true;
}
@Nullable
@Override
public BaseInjection findCommentInjection(@NotNull PsiElement host, @Nullable Ref<PsiElement> commentRef) {
@@ -63,6 +63,8 @@ public class CommentLanguageInjector implements MultiHostInjector {
if (support == myInjectorSupport && applicableFound) continue;
applicableFound = true;
if (!support.useDefaultCommentInjector())
continue;
BaseInjection injection = support.findCommentInjection(host, null);
if (injection == null) continue;
if (!InjectorUtils.registerInjectionSimple(host, injection, support, registrar)) continue;
@@ -57,6 +57,8 @@ public abstract class LanguageInjectionSupport {
public abstract boolean useDefaultInjector(PsiLanguageInjectionHost host);
public abstract boolean useDefaultCommentInjector();
@Nullable
public abstract BaseInjection findCommentInjection(@NotNull PsiElement host, @Nullable Ref<PsiElement> commentRef);