本文整理汇总了Java中org.eclipse.xtext.scoping.IGlobalScopeProvider类的典型用法代码示例。如果您正苦于以下问题:Java IGlobalScopeProvider类的具体用法?Java IGlobalScopeProvider怎么用?Java IGlobalScopeProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IGlobalScopeProvider类属于org.eclipse.xtext.scoping包,在下文中一共展示了IGlobalScopeProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGuiceBindingsRt
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的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: lazyLinkingTestLangaugeSetup
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的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: ImportedNamespaceAwareLocalScopeProvider
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
public ImportedNamespaceAwareLocalScopeProvider(IGlobalScopeProvider globalScopeProvider,
IQualifiedNameProvider qualifiedNameProvider, IQualifiedNameConverter qualifiedNameConverter,
ICaseInsensitivityHelper caseInsensitivityHelper) {
super(globalScopeProvider, caseInsensitivityHelper);
this.qualifiedNameProvider = qualifiedNameProvider;
this.qualifiedNameConverter = qualifiedNameConverter;
}
示例4: generate
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public void generate() {
if ((this.onlyEnabledIfGrammarIsUsed.get() && (!this.xbaseUsageDetector.inheritsXtype(this.getLanguage().getGrammar())))) {
return;
}
new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef(IGlobalScopeProvider.class),
TypeReference.typeRef("org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider")).contributeTo(this.getLanguage().getRuntimeGenModule());
GuiceModuleAccess _runtimeGenModule = this.getLanguage().getRuntimeGenModule();
_runtimeGenModule.setSuperClass(TypeReference.typeRef("org.eclipse.xtext.common.types.DefaultCommonTypesRuntimeModule"));
new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher"),
TypeReference.typeRef("org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher")).contributeTo(this.getLanguage().getEclipsePluginGenModule());
GuiceModuleAccess _eclipsePluginGenModule = this.getLanguage().getEclipsePluginGenModule();
_eclipsePluginGenModule.setSuperClass(TypeReference.typeRef("org.eclipse.xtext.common.types.ui.DefaultCommonTypesUiModule"));
ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest();
boolean _tripleNotEquals = (_manifest != null);
if (_tripleNotEquals) {
CollectionExtensions.<String>addAll(this.getProjectConfig().getRuntime().getManifest().getRequiredBundles(),
"org.eclipse.xtext.common.types",
"org.objectweb.asm;bundle-version=\"[5.0.1,6.0.0)\";resolution:=optional");
}
ManifestAccess _manifest_1 = this.getProjectConfig().getRuntimeTest().getManifest();
boolean _tripleNotEquals_1 = (_manifest_1 != null);
if (_tripleNotEquals_1) {
this.getProjectConfig().getRuntimeTest().getManifest().getRequiredBundles().add(
"org.objectweb.asm;bundle-version=\"[5.0.1,6.0.0)\";resolution:=optional");
}
ManifestAccess _manifest_2 = this.getProjectConfig().getEclipsePlugin().getManifest();
boolean _tripleNotEquals_2 = (_manifest_2 != null);
if (_tripleNotEquals_2) {
this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles().add(
"org.eclipse.xtext.common.types.ui");
}
}
示例5: registerGuiceBindingsRt
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
private void registerGuiceBindingsRt() {
new GuiceModuleAccess.BindingFactory()
.addTypeToType(typeRef(XtextResourceSet.class), typeRef(CooperateResourceSet.class))
.addTypeToType(typeRef(IGlobalScopeProvider.class), typeRef(CooperateGlobalScopeProvider.class))
.addTypeToType(typeRef(IGlobalScopeTypeQueryProvider.class),
typeRef(CooperateGlobalScopeProvider.class))
.addTypeToType(typeRef(IUMLUriFinder.class), typeRef(ConventionalUMLUriFinder.class))
.addTypeToType(typeRef(IUMLPrimitiveTypeFilter.class), typeRef(DefaultUMLPrimitiveTypeFilter.class))
.contributeTo(getLanguage().getRuntimeGenModule());
getProjectConfig().getRuntime().getManifest().getRequiredBundles()
.add("de.cooperateproject.modeling.textual.xtext.runtime;visibility:=reexport");
}
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:13,代码来源:CooperateResourceHandlingBindingsFragment2.java
示例6: getGuiceBindingsRt
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public Set<Binding> getGuiceBindingsRt(final Grammar grammar) {
return new BindFactory()
.addTypeToInstance(ClassLoader.class.getName(), "getClass().getClassLoader()")
.addTypeToInstance("org.eclipse.xtext.common.types.TypesFactory",
"org.eclipse.xtext.common.types.TypesFactory.eINSTANCE")
.addTypeToType("org.eclipse.xtext.common.types.access.IJvmTypeProvider.Factory",
"org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory")
.addTypeToType("org.eclipse.xtext.common.types.xtext.AbstractTypeScopeProvider",
"org.eclipse.xtext.common.types.xtext.ClasspathBasedTypeScopeProvider")
.addTypeToType(IGlobalScopeProvider.class.getName(),
"org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider")
.getBindings();
}
示例7: bindIGlobalScopeProvider
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return DefaultGlobalScopeProvider.class;
}
示例8: bindIGlobalScopeProvider
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return N4JSGlobalScopeProvider.class;
}
示例9: bindIGlobalScopeProvider
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return TypesAwareDefaultGlobalScopeProvider.class;
}
示例10: bindIGlobalScopeProvider
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return DefaultGlobalScopeProvider.class;
}
示例11: getGuiceBindingsRt
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的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();
}
示例12: getGuiceBindingsRt
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
return new BindFactory()
.addTypeToType(IGlobalScopeProvider.class.getName(), "org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider")
.getBindings();
}
示例13: getGlobalScopeProvider
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
protected Class<? extends IGlobalScopeProvider> getGlobalScopeProvider() {
return DefaultGlobalScopeProvider.class;
}
示例14: getGlobalScopeProvider
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
protected Class<? extends IGlobalScopeProvider> getGlobalScopeProvider() {
return ImportUriGlobalScopeProvider.class;
}
示例15: bindIGlobalScopeProvider
import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return TypesAwareDefaultGlobalScopeProvider.class;
}