Java 类org.eclipse.xtext.util.Modules2 实例源码

项目:xtext-core    文件:MultiProjectTest.java   
@Before
public void setup() {
  ServerModule _serverModule = new ServerModule();
  final Injector injector = Guice.createInjector(Modules2.mixin(_serverModule, new AbstractModule() {
    @Override
    protected void configure() {
      this.<IWorkspaceConfigFactory>bind(IWorkspaceConfigFactory.class).to(MultiProjectWorkspaceConfigFactory.class);
    }
  }));
  injector.injectMembers(this);
  final File workspaceRoot = this.getRoot("test-data");
  File _file = new File(workspaceRoot, "test-project0");
  this.project0 = _file;
  File _file_1 = new File(workspaceRoot, "test-project1");
  this.project1 = _file_1;
  this.project0.mkdir();
  this.project1.mkdir();
  final Procedure2<URI, Iterable<Issue>> _function = (URI $0, Iterable<Issue> $1) -> {
    this.diagnostics.put($0, IterableExtensions.<Issue>toList($1));
  };
  this.workspaceManager.initialize(URI.createFileURI(workspaceRoot.getAbsolutePath()), _function, null);
}
项目:pokemon-tcgo-deck-generator    文件:PkmntcgoActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:n4js    文件:N4JSActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:n4js    文件:RegularExpressionActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:n4js    文件:N4MFActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:n4js    文件:TypesActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:Xtext_Xtend_HTML_Generator    文件:MensaActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:bromium    文件:BromiumWebSetup.java   
@Override
public Injector createInjector() {
  BromiumRuntimeModule _bromiumRuntimeModule = new BromiumRuntimeModule();
  BromiumIdeModule _bromiumIdeModule = new BromiumIdeModule();
  BromiumWebModule _bromiumWebModule = new BromiumWebModule();
  return Guice.createInjector(Modules2.mixin(_bromiumRuntimeModule, _bromiumIdeModule, _bromiumWebModule));
}
项目:bromium    文件:DslActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:gw4e.project    文件:PoliciesActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:lcdsl    文件:LaunchingActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:gemoc-studio    文件:DslActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:gemoc-studio    文件:GExpressionsActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:mochalog    文件:PrologStandaloneSetupIdea.java   
@Override
public Injector createInjector()
{
    PrologRuntimeModule runtimeModule = new PrologRuntimeModule();
    PrologIdeaModule ideaModule = new PrologIdeaModule();
    Module mergedModule = Modules2.mixin(runtimeModule, ideaModule);
    return Guice.createInjector(mergedModule);
}
项目:org.xtext.dsl.restaurante    文件:RestauranteWebSetup.java   
@Override
public Injector createInjector() {
  RestauranteRuntimeModule _restauranteRuntimeModule = new RestauranteRuntimeModule();
  RestauranteIdeModule _restauranteIdeModule = new RestauranteIdeModule();
  RestauranteWebModule _restauranteWebModule = new RestauranteWebModule();
  return Guice.createInjector(Modules2.mixin(_restauranteRuntimeModule, _restauranteIdeModule, _restauranteWebModule));
}
项目:org.xtext.dsl.restaurante    文件:RestauranteActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:OCCI-Studio    文件:XtextActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:SurveyDSL    文件:QueryITActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:jason-eclipse-plugin    文件:Mas2jActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:jason-eclipse-plugin    文件:AslActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:xtext-extras    文件:XbaseWithAnnotationsIdeSetup.java   
@Override
public Injector createInjector() {
  XbaseWithAnnotationsRuntimeModule _xbaseWithAnnotationsRuntimeModule = new XbaseWithAnnotationsRuntimeModule();
  XbaseWithAnnotationsIdeModule _xbaseWithAnnotationsIdeModule = new XbaseWithAnnotationsIdeModule();
  return Guice.createInjector(
    Modules2.mixin(_xbaseWithAnnotationsRuntimeModule, _xbaseWithAnnotationsIdeModule));
}
项目:M2Doc    文件:MydslActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:minitl    文件:TcsActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:xtext-core    文件:PartialContentAssistTestLanguageIdeInjectorProvider.java   
@Override
protected Injector internalCreateInjector() {
    return new TestLanguageStandaloneSetup() {
        @Override
        public Injector createInjector() {
            return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new PartialContentAssistTestLanguageIdeModule()));
        }
    }.createInjectorAndDoEMFRegistration();
}
项目:xtext-core    文件:TestLanguageIdeInjectorProvider.java   
@Override
protected Injector internalCreateInjector() {
    return new TestLanguageStandaloneSetup() {
        @Override
        public Injector createInjector() {
            return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new TestLanguageIdeModule()));
        }
    }.createInjectorAndDoEMFRegistration();

}
项目:xtext-core    文件:XtextGrammarTestLanguageIdeInjectorProvider.java   
@Override
protected Injector internalCreateInjector() {
    return new XtextGrammarTestLanguageStandaloneSetup() {
        @Override
        public Injector createInjector() {
            return Guice.createInjector(Modules2.mixin(createRuntimeModule(), createIdeModule()));
        }

        private XtextGrammarTestLanguageIdeModule createIdeModule() {
            return new XtextGrammarTestLanguageIdeModule();
        }
    }.createInjectorAndDoEMFRegistration();
}
项目:Sparrow    文件:ReFactorActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:dsl-devkit    文件:ValidActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:dsl-devkit    文件:FormatActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:dsl-devkit    文件:AbstractSelectorFragmentProviderTest.java   
@Before
@Override
public void setUp() throws Exception {
  super.setUp();
  with(Modules2.mixin(new XtextRuntimeModule(), new AbstractModule() {
    @Override
    protected void configure() {
      bind(IFragmentProvider.class).to(TestSelectorFragmentProvider.class);
    }
  }));
}
项目:dsl-devkit    文件:TestLanguageActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:dsl-devkit    文件:ExportActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:dsl-devkit    文件:ScopeActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:dsl-devkit    文件:ExpressionActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:dsl-devkit    文件:CheckActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:dsl-devkit    文件:CheckCfgActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:bts    文件:EgyDslActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:xtext-gef    文件:StatemachineActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:scribble-eclipse    文件:ScribbleDslActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}
项目:scribble-eclipse    文件:ScribbleTraceDslActivator.java   
protected Injector createInjector(String language) {
    try {
        Module runtimeModule = getRuntimeModule(language);
        Module sharedStateModule = getSharedStateModule();
        Module uiModule = getUiModule(language);
        Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
        return Guice.createInjector(mergedModule);
    } catch (Exception e) {
        logger.error("Failed to create injector for " + language);
        logger.error(e.getMessage(), e);
        throw new RuntimeException("Failed to create injector for " + language, e);
    }
}