本文整理匯總了Java中org.eclipse.xtext.ISetup類的典型用法代碼示例。如果您正苦於以下問題:Java ISetup類的具體用法?Java ISetup怎麽用?Java ISetup使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ISetup類屬於org.eclipse.xtext包,在下文中一共展示了ISetup類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadRegistry
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
private IResourceServiceProvider.Registry loadRegistry() {
final ResourceServiceProviderRegistryImpl registry = new ResourceServiceProviderRegistryImpl();
for (final ISetup cp : this.setupLoader) {
{
final Injector injector = cp.createInjectorAndDoEMFRegistration();
final IResourceServiceProvider resourceServiceProvider = injector.<IResourceServiceProvider>getInstance(IResourceServiceProvider.class);
final FileExtensionProvider extensionProvider = injector.<FileExtensionProvider>getInstance(FileExtensionProvider.class);
Set<String> _fileExtensions = extensionProvider.getFileExtensions();
for (final String ext : _fileExtensions) {
boolean _containsKey = registry.getExtensionToFactoryMap().containsKey(ext);
if (_containsKey) {
String _primaryFileExtension = extensionProvider.getPrimaryFileExtension();
boolean _equals = Objects.equal(_primaryFileExtension, ext);
if (_equals) {
registry.getExtensionToFactoryMap().put(ext, resourceServiceProvider);
}
} else {
registry.getExtensionToFactoryMap().put(ext, resourceServiceProvider);
}
}
}
}
return registry;
}
示例2: lazyLinkingTestLangaugeSetup
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
protected ISetup lazyLinkingTestLangaugeSetup() {
return new LazyLinkingTestLanguageStandaloneSetup() {
@Override
public Injector createInjector() {
return Guice.createInjector(new org.eclipse.xtext.linking.lazy.LazyLinkingTestLanguageRuntimeModule() {
@Override
public void configureIResourceDescriptions(Binder binder) {
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to(
ProxyfyingResourceDecriptions.class);
}
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider.class;
}
});
}
};
}
示例3: doGetSetup
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
protected ISetup doGetSetup() {
return new ISetup() {
public Injector createInjectorAndDoEMFRegistration() {
return new EntitiesUiInjectorProvider().getInjector();
}
};
}
開發者ID:LorenzoBettini,項目名稱:packtpub-xtext-book-examples,代碼行數:8,代碼來源:EntitiesContentAssistJavaTest.java
示例4: addRegister
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
/**
* Registers a language initializer.
*/
public void addRegister(ISetup setup) {
injectors.add(setup.createInjectorAndDoEMFRegistration());
}
示例5: getDelegate
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
/**
* @return the delegate
*/
public ISetup getDelegate() {
return delegate;
}
示例6: setDelegate
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
/**
* @param delegate the delegate to set
*/
@Mandatory
public void setDelegate(ISetup delegate) {
this.delegate = delegate;
}
示例7: with
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
protected void with(Class<? extends ISetup> setupClazz) throws Exception {
assertTrue("super.setUp() has to be called before any injector is instantiated", canCreateInjector);
ISetup instance = setupClazz.newInstance();
setInjector(instance.createInjectorAndDoEMFRegistration());
}
示例8: addRegister
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
/**
* Register a language setup. Only the first registered setup is used to inject the resource set.
*/
public void addRegister(ISetup setup) {
injectors.add(setup.createInjectorAndDoEMFRegistration());
}
示例9: setRegister
import org.eclipse.xtext.ISetup; //導入依賴的package包/類
/**
* registering an {@link ISetup}, which causes the execution of {@link ISetup#createInjectorAndDoEMFRegistration()}
* the resulting {@link com.google.inject.Inject} is stored and used to obtain the used {@link IGenerator}.
*/
public void setRegister(ISetup setup) {
injector = setup.createInjectorAndDoEMFRegistration();
}