當前位置: 首頁>>代碼示例>>Java>>正文


Java ISetup類代碼示例

本文整理匯總了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;
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:25,代碼來源:ResourceServiceProviderServiceLoader.java

示例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;
				}
			});
		}
	};
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:20,代碼來源:LazyLinkingResourceTest.java

示例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());
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:7,代碼來源:XcoreReader.java

示例5: getDelegate

import org.eclipse.xtext.ISetup; //導入依賴的package包/類
/**
 * @return the delegate
 */
public ISetup getDelegate() {
	return delegate;
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:7,代碼來源:CachedSetup.java

示例6: setDelegate

import org.eclipse.xtext.ISetup; //導入依賴的package包/類
/**
 * @param delegate the delegate to set
 */
@Mandatory
public void setDelegate(ISetup delegate) {
	this.delegate = delegate;
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:8,代碼來源:CachedSetup.java

示例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());
}
 
開發者ID:eclipse,項目名稱:xtext-extras,代碼行數:6,代碼來源:AbstractXtextTests.java

示例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());
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:7,代碼來源:AbstractReader.java

示例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();
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:8,代碼來源:GeneratorComponent.java


注:本文中的org.eclipse.xtext.ISetup類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。