Injection (@NotNull PsiElement context) { if (!(context instanceof PsiLanguageInjectionHost host) || context instanceof PsiComment) return null; if (!((PsiLanguageInjectionHost)context).isValidHost()) return null; boolean applicableFound = false; for (LanguageInjectionSupport support : InjectorUtils.getActiveInjectionSupports()) { if (!support.isApplicableTo(host)) continue; applicableFound = true; //noinspection deprecation if (!support.useDefaultCommentInjector()) continue; BaseInjection injection = support.findCommentInjection(host, null); if (isCompatible(injection, context)) { return injection; } } if (applicableFound) return null; BaseInjection commentInjection = InjectorUtils.findCommentInjection(host, "comment", null); if (!isCompatible(commentInjection, context)) return null; return commentInjection; }