Java 类com.intellij.lang.injection.ConcatenationAwareInjector 实例源码

项目:intellij-ce-playground    文件:JavaConcatenationInjectorManager.java   
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;
}
项目:tools-idea    文件:JavaConcatenationInjectorManager.java   
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;
}
项目:consulo-java    文件:JavaConcatenationInjectorManager.java   
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;
}
项目:intellij-ce-playground    文件:JavaConcatenationInjectorManager.java   
public void registerConcatenationInjector(@NotNull ConcatenationAwareInjector injector) {
  myConcatenationInjectors.add(injector);
  concatenationInjectorsChanged();
}
项目:intellij-ce-playground    文件:JavaConcatenationInjectorManager.java   
public boolean unregisterConcatenationInjector(@NotNull ConcatenationAwareInjector injector) {
  boolean removed = myConcatenationInjectors.remove(injector);
  concatenationInjectorsChanged();
  return removed;
}
项目:tools-idea    文件:JavaConcatenationInjectorManager.java   
public void registerConcatenationInjector(@NotNull ConcatenationAwareInjector injector) {
  myConcatenationInjectors.add(injector);
  concatenationInjectorsChanged();
}
项目:tools-idea    文件:JavaConcatenationInjectorManager.java   
public boolean unregisterConcatenationInjector(@NotNull ConcatenationAwareInjector injector) {
  boolean removed = myConcatenationInjectors.remove(injector);
  concatenationInjectorsChanged();
  return removed;
}
项目:consulo-java    文件:JavaConcatenationInjectorManager.java   
public void registerConcatenationInjector(@NotNull ConcatenationAwareInjector injector)
{
    myConcatenationInjectors.add(injector);
    concatenationInjectorsChanged();
}
项目:consulo-java    文件:JavaConcatenationInjectorManager.java   
public boolean unregisterConcatenationInjector(@NotNull ConcatenationAwareInjector injector)
{
    boolean removed = myConcatenationInjectors.remove(injector);
    concatenationInjectorsChanged();
    return removed;
}