private static MultiHostRegistrarImpl doCompute(@NotNull PsiFile containingFile, @NotNull Project project, @NotNull PsiElement anchor, @NotNull PsiElement[] operands) { MultiHostRegistrarImpl registrar = new MultiHostRegistrarImpl(project, containingFile, anchor); JavaConcatenationInjectorManager concatenationInjectorManager = getInstance(project); for (ConcatenationAwareInjector concatenationInjector : concatenationInjectorManager.myConcatenationInjectors) { concatenationInjector.getLanguagesToInject(registrar, operands); if (registrar.getResult() != null) break; } if (registrar.getResult() == null) { registrar = null; } return registrar; }
private static InjectionResult doCompute(@NotNull PsiFile containingFile, @NotNull Project project, @NotNull PsiElement anchor, @NotNull PsiElement[] operands) { InjectionRegistrarImpl registrar = new InjectionRegistrarImpl(project, containingFile, anchor); InjectionResult result = null; JavaConcatenationInjectorManager concatenationInjectorManager = getInstance(project); for(ConcatenationAwareInjector concatenationInjector : concatenationInjectorManager.myConcatenationInjectors) { concatenationInjector.getLanguagesToInject(registrar, operands); result = registrar.getInjectedResult(); if(result != null) { break; } } return result; }
public void registerConcatenationInjector(@NotNull ConcatenationAwareInjector injector) { myConcatenationInjectors.add(injector); concatenationInjectorsChanged(); }
public boolean unregisterConcatenationInjector(@NotNull ConcatenationAwareInjector injector) { boolean removed = myConcatenationInjectors.remove(injector); concatenationInjectorsChanged(); return removed; }