boolean (@Nullable BaseInjection injection, @NotNull PsiElement context) { if (injection == null) return false; if (injection.getInjectionPlaces().length == 0) return true; // it seems that "placeless" injections shouldn't be checked return injection.acceptsPsiElement(context); }