void (@NotNull MultiHostRegistrar registrar, @NotNull PsiFile containingFile, @Nullable InjectedLanguage tempInjectedLanguage, PsiElement @NotNull [] operands) { Language tempLanguage = tempInjectedLanguage == null ? null : tempInjectedLanguage.getLanguage(); LanguageInjectionSupport injectionSupport = tempLanguage == null ? InjectorUtils.findNotNullInjectionSupport(JavaLanguageInjectionSupport.JAVA_SUPPORT_ID) : TemporaryPlacesRegistry.getInstance(myProject).getLanguageInjectionSupport(); InjectionProcessor injectionProcessor = new InjectionProcessor(Configuration.getProjectInstance(myProject), injectionSupport, operands) { @Override protected Pair<PsiLanguageInjectionHost, Language> processInjection(Language language, List<InjectionInfo> list, boolean settingsAvailable, boolean unparsable) { InjectorUtils.registerInjection(language, containingFile, list, registrar); InjectorUtils.registerSupport(getLanguageInjectionSupport(), settingsAvailable, list.get(0).host(), language); PsiLanguageInjectionHost host = list.get(0).host(); if (tempLanguage != null) { InjectorUtils .putInjectedFileUserData(host, language, LanguageInjectionSupport.TEMPORARY_INJECTED_LANGUAGE, tempInjectedLanguage); } InjectorUtils .putInjectedFileUserData(host, language, InjectedLanguageUtil.FRANKENSTEIN_INJECTION, unparsable ? Boolean.TRUE : null); return Pair.create(host, language); } @Override protected boolean areThereInjectionsWithName(String methodName, boolean annoOnly) { if (methodName == null) return false; if (getAnnotatedElementsValue().contains(methodName)) { return true; } return !annoOnly && getXmlAnnotatedElementsValue().contains(methodName); } }; if (tempLanguage != null) { BaseInjection baseInjection = new BaseInjection(JavaLanguageInjectionSupport.JAVA_SUPPORT_ID); baseInjection.setInjectedLanguageId(tempInjectedLanguage.getID()); List<Pair<PsiLanguageInjectionHost, Language>> list = injectionProcessor.processInjectionWithContext(baseInjection, false); for (Pair<PsiLanguageInjectionHost, Language> pair : list) { PsiLanguageInjectionHost host = pair.getFirst(); Language language = pair.getSecond(); InjectorUtils.putInjectedFileUserData(host, language, LanguageInjectionSupport.TEMPORARY_INJECTED_LANGUAGE, tempInjectedLanguage); } } else { injectionProcessor.processInjections(); } }