本文整理匯總了Java中org.eclipse.xtext.util.Modules2類的典型用法代碼示例。如果您正苦於以下問題:Java Modules2類的具體用法?Java Modules2怎麽用?Java Modules2使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Modules2類屬於org.eclipse.xtext.util包,在下文中一共展示了Modules2類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setup
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@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);
}
示例2: createInjector
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
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);
}
}
示例3: createInjector
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@Override
public Injector createInjector() {
BromiumRuntimeModule _bromiumRuntimeModule = new BromiumRuntimeModule();
BromiumIdeModule _bromiumIdeModule = new BromiumIdeModule();
BromiumWebModule _bromiumWebModule = new BromiumWebModule();
return Guice.createInjector(Modules2.mixin(_bromiumRuntimeModule, _bromiumIdeModule, _bromiumWebModule));
}
示例4: createInjector
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@Override
public Injector createInjector()
{
PrologRuntimeModule runtimeModule = new PrologRuntimeModule();
PrologIdeaModule ideaModule = new PrologIdeaModule();
Module mergedModule = Modules2.mixin(runtimeModule, ideaModule);
return Guice.createInjector(mergedModule);
}
示例5: createInjector
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@Override
public Injector createInjector() {
RestauranteRuntimeModule _restauranteRuntimeModule = new RestauranteRuntimeModule();
RestauranteIdeModule _restauranteIdeModule = new RestauranteIdeModule();
RestauranteWebModule _restauranteWebModule = new RestauranteWebModule();
return Guice.createInjector(Modules2.mixin(_restauranteRuntimeModule, _restauranteIdeModule, _restauranteWebModule));
}
示例6: createInjector
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@Override
public Injector createInjector() {
XbaseWithAnnotationsRuntimeModule _xbaseWithAnnotationsRuntimeModule = new XbaseWithAnnotationsRuntimeModule();
XbaseWithAnnotationsIdeModule _xbaseWithAnnotationsIdeModule = new XbaseWithAnnotationsIdeModule();
return Guice.createInjector(
Modules2.mixin(_xbaseWithAnnotationsRuntimeModule, _xbaseWithAnnotationsIdeModule));
}
示例7: internalCreateInjector
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@Override
protected Injector internalCreateInjector() {
return new TestLanguageStandaloneSetup() {
@Override
public Injector createInjector() {
return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new PartialContentAssistTestLanguageIdeModule()));
}
}.createInjectorAndDoEMFRegistration();
}
示例8: internalCreateInjector
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@Override
protected Injector internalCreateInjector() {
return new TestLanguageStandaloneSetup() {
@Override
public Injector createInjector() {
return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new TestLanguageIdeModule()));
}
}.createInjectorAndDoEMFRegistration();
}
示例9: internalCreateInjector
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@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();
}
示例10: setUp
import org.eclipse.xtext.util.Modules2; //導入依賴的package包/類
@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);
}
}));
}