boolean (@NotNull Project project, Editor editor, PsiFile file) { if (PlatformUtils.isPyCharmEducational()) { return false; } if (editor.getUserData(CheckRegExpForm.Keys.CHECK_REG_EXP_EDITOR) != null) { // to disable intention inside CheckRegExpForm itself return false; } Pair<PsiElement, TextRange> pair = getRangePair(file, editor); if (pair != null && pair.first != null) { Language language = pair.first.getLanguage(); return language.isKindOf(RegExpLanguage.INSTANCE); } PsiFile baseFile = InjectedLanguageManager.getInstance(project).getTopLevelFile(file); return baseFile != null && baseFile.getLanguage().isKindOf(RegExpLanguage.INSTANCE); }