Java 类org.eclipse.xtext.scoping.IGlobalScopeProvider 实例源码

项目:xtext-extras    文件:AbstractScopingFragment.java   
@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();
}
项目:xtext-core    文件:LazyLinkingResourceTest.java   
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;
                }
            });
        }
    };
}
项目:xtext-core    文件:ImportedNamespaceAwareLocalScopeProvider.java   
public ImportedNamespaceAwareLocalScopeProvider(IGlobalScopeProvider globalScopeProvider,
        IQualifiedNameProvider qualifiedNameProvider, IQualifiedNameConverter qualifiedNameConverter,
        ICaseInsensitivityHelper caseInsensitivityHelper) {
    super(globalScopeProvider, caseInsensitivityHelper);
    this.qualifiedNameProvider = qualifiedNameProvider;
    this.qualifiedNameConverter = qualifiedNameConverter;
}
项目:xtext-core    文件:TypesGeneratorFragment2.java   
@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");
  }
}
项目:CooperateModelingEnvironment    文件:CooperateResourceHandlingBindingsFragment2.java   
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");
}
项目:antlr4ide    文件:JdtFreeTypesGeneratorFragment.java   
@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();
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:n4js    文件:AbstractTypesRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:n4js    文件:AbstractRegularExpressionRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:n4js    文件:N4JSRuntimeModule.java   
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return N4JSGlobalScopeProvider.class;
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:bromium    文件:AbstractBromiumRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:gw4e.project    文件:AbstractDSLPoliciesRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:lcdsl    文件:AbstractLcDslRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:gemoc-studio    文件:AbstractDslRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:OCCI-Studio    文件:AbstractOCCIRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractPureXbaseRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractXbaseRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractXbaseWithAnnotationsRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractRefactoringTestLanguageRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractRefactoringTestLanguage1RuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractContentAssistTestLanguageRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractRefactoringTestLanguage2RuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:BuilderTestLanguageRuntimeModule.java   
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:XbaseGeneratorFragment.java   
@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();
}
项目:xtext-extras    文件:TypesGeneratorFragment.java   
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
    return new BindFactory()
        .addTypeToType(IGlobalScopeProvider.class.getName(), "org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider")
        .getBindings();
}
项目:xtext-extras    文件:ImportNamespacesScopingFragment.java   
@Override
protected Class<? extends IGlobalScopeProvider> getGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:ImportURIScopingFragment.java   
@Override
protected Class<? extends IGlobalScopeProvider> getGlobalScopeProvider() {
    return ImportUriGlobalScopeProvider.class;
}
项目:xtext-extras    文件:DefaultCommonTypesRuntimeModule.java   
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractBug462047LangRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractXImportSectionTestLangRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:xtext-extras    文件:AbstractContentAssistFragmentTestLangRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return TypesAwareDefaultGlobalScopeProvider.class;
}
项目:M2Doc    文件:AbstractMyDslRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:minitl    文件:AbstractMinitlRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:xtext-core    文件:DefaultRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return ImportUriGlobalScopeProvider.class;
}
项目:xtext-core    文件:AbstractGlobalScopeDelegatingScopeProvider.java   
protected AbstractGlobalScopeDelegatingScopeProvider(IGlobalScopeProvider globalScopeProvider, ICaseInsensitivityHelper caseInsensitivityHelper) {
    this.globalScopeProvider = globalScopeProvider;
    this.caseInsensitivityHelper = caseInsensitivityHelper;
}
项目:xtext-core    文件:XtextRuntimeModule.java   
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:xtext-core    文件:AbstractPartialContentAssistTestLanguageRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}
项目:xtext-core    文件:AbstractPartialSerializationTestLanguageRuntimeModule.java   
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
    return DefaultGlobalScopeProvider.class;
}