import org.jetbrains.annotations.NotNull;
import javax.swing.*;
public class CheckRegExpIntentionAction extends QuickEditAction implements Iconable {
@Override
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
<BUG>final Pair<PsiElement, TextRange> pair = getRangePair(file, editor);
if (pair != null && pair.first != null) {
Language language = pair.first.getLanguage();
Language baseLanguage = language.getBaseLanguage();
return language == RegExpLanguage.INSTANCE || baseLanguage == RegExpLanguage.INSTANCE;</BUG>
}

import org.jetbrains.annotations.NotNull;
import javax.swing.*;
public class CheckRegExpIntentionAction extends QuickEditAction implements Iconable {
@Override
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
Pair<PsiElement, TextRange> pair = getRangePair(file, editor);
if (pair != null && pair.first != null) {
Language language = pair.first.getLanguage();
return language.isKindOf(RegExpLanguage.INSTANCE);
}
