@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); }
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); } }
@Override public Injector createInjector() { BromiumRuntimeModule _bromiumRuntimeModule = new BromiumRuntimeModule(); BromiumIdeModule _bromiumIdeModule = new BromiumIdeModule(); BromiumWebModule _bromiumWebModule = new BromiumWebModule(); return Guice.createInjector(Modules2.mixin(_bromiumRuntimeModule, _bromiumIdeModule, _bromiumWebModule)); }
@Override public Injector createInjector() { PrologRuntimeModule runtimeModule = new PrologRuntimeModule(); PrologIdeaModule ideaModule = new PrologIdeaModule(); Module mergedModule = Modules2.mixin(runtimeModule, ideaModule); return Guice.createInjector(mergedModule); }
@Override public Injector createInjector() { RestauranteRuntimeModule _restauranteRuntimeModule = new RestauranteRuntimeModule(); RestauranteIdeModule _restauranteIdeModule = new RestauranteIdeModule(); RestauranteWebModule _restauranteWebModule = new RestauranteWebModule(); return Guice.createInjector(Modules2.mixin(_restauranteRuntimeModule, _restauranteIdeModule, _restauranteWebModule)); }
@Override public Injector createInjector() { XbaseWithAnnotationsRuntimeModule _xbaseWithAnnotationsRuntimeModule = new XbaseWithAnnotationsRuntimeModule(); XbaseWithAnnotationsIdeModule _xbaseWithAnnotationsIdeModule = new XbaseWithAnnotationsIdeModule(); return Guice.createInjector( Modules2.mixin(_xbaseWithAnnotationsRuntimeModule, _xbaseWithAnnotationsIdeModule)); }
@Override protected Injector internalCreateInjector() { return new TestLanguageStandaloneSetup() { @Override public Injector createInjector() { return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new PartialContentAssistTestLanguageIdeModule())); } }.createInjectorAndDoEMFRegistration(); }
@Override protected Injector internalCreateInjector() { return new TestLanguageStandaloneSetup() { @Override public Injector createInjector() { return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new TestLanguageIdeModule())); } }.createInjectorAndDoEMFRegistration(); }
@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(); }
@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); } })); }