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


Java AbstractDeclarativeScopeProvider類代碼示例

本文整理匯總了Java中org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider的典型用法代碼示例。如果您正苦於以下問題:Java AbstractDeclarativeScopeProvider類的具體用法?Java AbstractDeclarativeScopeProvider怎麽用?Java AbstractDeclarativeScopeProvider使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AbstractDeclarativeScopeProvider類屬於org.eclipse.xtext.scoping.impl包,在下文中一共展示了AbstractDeclarativeScopeProvider類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getGuiceBindingsRt

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
	BindFactory factory = new BindFactory();
	if (!XbaseGeneratorFragment.doesUseXbase(grammar)) {
		if(isGenerateStub) {
			factory.addTypeToType(IScopeProvider.class.getName(), getScopeProviderName(grammar, getNaming()));
		} else {
			factory.addTypeToType(IScopeProvider.class.getName(), getLocalScopeProvider().getName());
		}
		factory.addConfiguredBinding(
				IScopeProvider.class.getName() + "Delegate",
				"binder.bind(" + IScopeProvider.class.getName() + ".class"
						+ ").annotatedWith(com.google.inject.name.Names.named("
						+ AbstractDeclarativeScopeProvider.class.getName() + ".NAMED_DELEGATE" + ")).to("
						+ getLocalScopeProvider().getName() + ".class)");
		factory.addTypeToType(IGlobalScopeProvider.class.getName(), getGlobalScopeProvider().getName());
	}
	factory.addConfiguredBinding(IgnoreCaseLinking.class.getSimpleName(), "binder.bindConstant().annotatedWith("
			+ IgnoreCaseLinking.class.getName() + ".class).to(" + isIgnoreCase() + ")");
	return factory.getBindings();
}
 
開發者ID:eclipse,項目名稱:xtext-extras,代碼行數:22,代碼來源:AbstractScopingFragment.java

示例2: registerGuiceBindingsRt

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
private void registerGuiceBindingsRt() {
    new GuiceModuleAccess.BindingFactory()
            .addTypeToType(typeRef(IQualifiedNameProvider.class), typeRef(CommonQualifiedNameProvider.class))
            .addTypeToType(typeRef(IAlternativeNameProvider.class), typeRef(CommonQualifiedNameProvider.class))
            .addConfiguredBinding("IScopeProviderDelegate", new StringConcatenationClient() {
                @Override
                protected void appendTo(TargetStringConcatenation target) {
                    target.append("binder.bind(");
                    target.append(typeRef(IScopeProvider.class));
                    target.append(".class).annotatedWith(");
                    target.append(typeRef(Names.class));
                    target.append(".named(");
                    target.append(typeRef(AbstractDeclarativeScopeProvider.class));
                    target.append(".NAMED_DELEGATE)).to(");
                    target.append(typeRef(CooperateImportedNamespaceAwareLocalScopeProvider.class));
                    target.append(".class);");
                }
            }).contributeTo(getLanguage().getRuntimeGenModule());
}
 
開發者ID:Cooperate-Project,項目名稱:CooperateModelingEnvironment,代碼行數:20,代碼來源:CooperateNamingBindingsFragment2.java

示例3: setUp

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
@Override
public void setUp() throws Exception {
	super.setUp();
	with(new IgnoreCaseNamespacesTestLanguageStandaloneSetup() {
		@Override
		public Injector createInjector() {
			return Guice.createInjector(new IgnoreCaseNamespacesTestLanguageRuntimeModule() {
				@Override
				public void configureIScopeProviderDelegate(Binder binder) {
					binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(OtherWildcardLocalScopeProvider.class);
				}
			});
		}
	});
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:16,代碼來源:IgnoreCaseLinkingWithDifferentWildcardTest.java

示例4: configureIScopeProviderDelegate

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
@Override
public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
	binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class)
			.annotatedWith(
					com.google.inject.name.Names
							.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE))
			.to(SmallJavaImportedNamespaceAwareLocalScopeProvider.class);
}
 
開發者ID:LorenzoBettini,項目名稱:packtpub-xtext-book-examples,代碼行數:9,代碼來源:SmallJavaRuntimeModule.java

示例5: configureIScopeProviderDelegate

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
public void configureIScopeProviderDelegate(Binder binder) {
	binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class);
}
 
開發者ID:rehne93,項目名稱:pokemon-tcgo-deck-generator,代碼行數:4,代碼來源:AbstractPkmntcgoRuntimeModule.java

示例6: configureIScopeProviderDelegate

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
public void configureIScopeProviderDelegate(Binder binder) {
	binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(XImportSectionNamespaceScopeProvider.class);
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:4,代碼來源:AbstractDSLPoliciesRuntimeModule.java

示例7: getGuiceBindingsRt

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
	if (!usesXbaseGrammar(grammar))
		return emptySet();
	BindFactory config = new BindFactory()
					
			// overrides binding from org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
			.addTypeToType(IQualifiedNameProvider.class.getName(),
							"org.eclipse.xtext.xbase.scoping.XbaseQualifiedNameProvider");
			
	if (useInferredJvmModel) {
		config = config
				.addTypeToType(ILocationInFileProvider.class.getName(),
						"org.eclipse.xtext.xbase.jvmmodel.JvmLocationInFileProvider")
				.addTypeToType(IGlobalScopeProvider.class.getName(),
						"org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider")
				.addTypeToType("org.eclipse.xtext.xbase.validation.FeatureNameValidator",
						"org.eclipse.xtext.xbase.validation.LogicalContainerAwareFeatureNameValidator")
				.addTypeToType("org.eclipse.xtext.xbase.typesystem.internal.DefaultBatchTypeResolver",
						"org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareBatchTypeResolver")
				.addTypeToType("org.eclipse.xtext.xbase.typesystem.internal.DefaultReentrantTypeResolver",
						"org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareReentrantTypeResolver")
				.addTypeToType(IResourceValidator.class.getCanonicalName(), 
						"org.eclipse.xtext.xbase.annotations.validation.DerivedStateAwareResourceValidator");
		if(generateXtendInferrer) {
			config = config
				.addTypeToType("org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer",
					getJvmModelInferrerName(grammar, getNaming()));
		}
	} else {
		config = config
				.addTypeToType(ILocationInFileProvider.class.getName(),
							"org.eclipse.xtext.xbase.resource.XbaseLocationInFileProvider");

	}
	if (usesXImportSection(grammar)) {
		config = config.addConfiguredBinding(
				IScopeProvider.class.getName() + "Delegate",
				"binder.bind("
						+ IScopeProvider.class.getName()
						+ ".class).annotatedWith(com.google.inject.name.Names.named("
						+ AbstractDeclarativeScopeProvider.class.getName()
						+ ".NAMED_DELEGATE)).to("+ getImportScopeProvider(grammar)+")");
	}
	return config.getBindings();
}
 
開發者ID:eclipse,項目名稱:xtext-extras,代碼行數:47,代碼來源:XbaseGeneratorFragment.java

示例8: getDefaultScopeProviderSuperClassName

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
protected String getDefaultScopeProviderSuperClassName() {
	return AbstractDeclarativeScopeProvider.class.getName();
}
 
開發者ID:eclipse,項目名稱:xtext-extras,代碼行數:4,代碼來源:AbstractScopingFragment.java

示例9: configureIScopeProviderDelegate

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
public void configureIScopeProviderDelegate(Binder binder) {
	binder.bind(IScopeProvider.class)
		.annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE))
		.to(FileAwareTestLanguageImportScopeProvider.class);
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:6,代碼來源:FileAwareTestLanguageRuntimeModule.java

示例10: configureIScopeProviderDelegate

import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //導入依賴的package包/類
public void configureIScopeProviderDelegate(Binder binder) {
	binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(SimpleLocalScopeProvider.class);
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:4,代碼來源:AbstractIgnoreCaseImportsTestLanguageRuntimeModule.java


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