当前位置: 首页>>代码示例>>Java>>正文


Java IGlobalScopeProvider类代码示例

本文整理汇总了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();
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:22,代码来源:AbstractScopingFragment.java

示例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;
				}
			});
		}
	};
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:20,代码来源:LazyLinkingResourceTest.java

示例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;
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:8,代码来源:ImportedNamespaceAwareLocalScopeProvider.java

示例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");
  }
}
 
开发者ID:eclipse,项目名称:xtext-core,代码行数:34,代码来源:TypesGeneratorFragment2.java

示例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();
}
 
开发者ID:antlr4ide,项目名称:antlr4ide,代码行数:15,代码来源:JdtFreeTypesGeneratorFragment.java

示例7: bindIGlobalScopeProvider

import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
	return DefaultGlobalScopeProvider.class;
}
 
开发者ID:rehne93,项目名称:pokemon-tcgo-deck-generator,代码行数:4,代码来源:AbstractPkmntcgoRuntimeModule.java

示例8: bindIGlobalScopeProvider

import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
	return N4JSGlobalScopeProvider.class;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:N4JSRuntimeModule.java

示例9: bindIGlobalScopeProvider

import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
	return TypesAwareDefaultGlobalScopeProvider.class;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:4,代码来源:AbstractDSLPoliciesRuntimeModule.java

示例10: bindIGlobalScopeProvider

import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
	return DefaultGlobalScopeProvider.class;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:5,代码来源:BuilderTestLanguageRuntimeModule.java

示例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();
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:47,代码来源:XbaseGeneratorFragment.java

示例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();
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:7,代码来源:TypesGeneratorFragment.java

示例13: getGlobalScopeProvider

import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
protected Class<? extends IGlobalScopeProvider> getGlobalScopeProvider() {
	return DefaultGlobalScopeProvider.class;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:5,代码来源:ImportNamespacesScopingFragment.java

示例14: getGlobalScopeProvider

import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
protected Class<? extends IGlobalScopeProvider> getGlobalScopeProvider() {
	return ImportUriGlobalScopeProvider.class;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:5,代码来源:ImportURIScopingFragment.java

示例15: bindIGlobalScopeProvider

import org.eclipse.xtext.scoping.IGlobalScopeProvider; //导入依赖的package包/类
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
	return TypesAwareDefaultGlobalScopeProvider.class;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:5,代码来源:DefaultCommonTypesRuntimeModule.java


注:本文中的org.eclipse.xtext.scoping.IGlobalScopeProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。