本文整理汇总了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();
}
示例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);
}
});
}
});
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例8: getDefaultScopeProviderSuperClassName
import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; //导入依赖的package包/类
protected String getDefaultScopeProviderSuperClassName() {
return AbstractDeclarativeScopeProvider.class.getName();
}
示例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);
}
示例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);
}