boolean (PsiElement element) { if (!isActive() || isInsideLibraryScope()) return false; PsiFile file = ReadAction.compute(() -> element.getContainingFile()); return file != null && !InjectedLanguageManager.getInstance(project).isInjectedFragment(file); }