org.eclipse.xtext.naming.IQualifiedNameConverter的实例源码

项目:n4js    文件IsInScopeWithOptionalPositionPredicate.java   
public IsInScopeWithOptionalPositionPredicate(IQualifiednameConverter converter,URI currentURI,boolean withLineNumber,IScope scope) {
    super();
    this.converter = converter;
    this.scope = scope;
    this.currentURI = currentURI;
    this.withLineNumber = withLineNumber;
}
项目:xtext-extras    文件ClasspathBasedConstructorScopeTest.java   
@Before
public void setUp() throws Exception {
    factory = new ClasspathTypeProviderFactory(getClass().getClassLoader(),null);
    resourceSet = new ResourceSetImpl();
    typeScope = new ClasspathBasedTypeScope(factory.createTypeProvider(resourceSet),new IQualifiednameConverter.DefaultImpl(),Predicates.<IEObjectDescription>alwaysTrue());
    constructorScope = new ClasspathBasedConstructorScope(typeScope);
}
项目:xtext-extras    文件AbstractConstructorScopeTest.java   
@Test public void testGetElementByInstance_01() {
    JvmConstructor constructor = TypesFactory.eINSTANCE.createJvmConstructor();
    JvmGenericType type = TypesFactory.eINSTANCE.createJvmGenericType();
    type.setPackageName("java.lang");
    type.setSimpleName("Object");
    constructor.setSimpleName("Object");
    type.getMembers().add(constructor);
    IEObjectDescription element = getConstructorScope().getSingleElement(constructor);
    assertNotNull(element);
    assertEquals(new IQualifiednameConverter.DefaultImpl().toQualifiedname("java.lang.Object"),element.getName());
    assertEquals(new IQualifiednameConverter.DefaultImpl().toQualifiedname("java.lang.Object"),element.getQualifiedname());
}
项目:xtext-extras    文件AbstractTypeScope.java   
protected AbstractTypeScope(IJvmTypeProvider typeProvider,IQualifiednameConverter qualifiednameConverter,Predicate<IEObjectDescription> filter) {
    super(IScope.NULLScopE,false);
    this.typeProvider = typeProvider;
    this.qualifiednameConverter = qualifiednameConverter;
    this.filter = filter;
}
项目:xtext-core    文件ImportednamespaceAwareLocalScopeProvider.java   
public ImportednamespaceAwareLocalScopeProvider(IGlobalScopeProvider globalScopeProvider,IQualifiednameProvider qualifiednameProvider,ICaseInsensitivityHelper caseInsensitivityHelper) {
    super(globalScopeProvider,caseInsensitivityHelper);
    this.qualifiednameProvider = qualifiednameProvider;
    this.qualifiednameConverter = qualifiednameConverter;
}
项目:xtext-core    文件ImportednamespaceAwareLocalScopeProviderTest.java   
@Override
public void setUp() throws Exception {
    super.setUp();
    with(new IndexTestLanguageStandalonesetup());

    globalScopeProvider = new ResourceSetGlobalScopeProvider();
    nameProvider = new DefaultDeclarativeQualifiednameProvider();
    nameConverter = new IQualifiednameConverter.DefaultImpl();
    final DefaultResourceDescriptionStrategy strategy = new DefaultResourceDescriptionStrategy();
    strategy.setQualifiednameProvider(nameProvider);
    final DefaultResourceDescriptionManager resourceDescMnr = new DefaultResourceDescriptionManager() {
        @Override
        public IResourceDescription getResourceDescription(Resource resource) {
            DefaultResourceDescription resourceDescription = new DefaultResourceDescription(resource,strategy);
            return resourceDescription;
        }

    };
    final DefaultResourceServiceProvider provider = new DefaultResourceServiceProvider() {
        @Override
        public Manager getResourceDescriptionManager() {
            return resourceDescMnr;
        }
    };
    globalScopeProvider.setGlobalResourceDecriptionProvider(new GlobalResourceDescriptionProvider(new ResourceServiceProviderRegistryImpl() {
        @Override
        public IResourceServiceProvider getResourceServiceProvider(URI uri,String contentType) {
            return provider;
        }
    }));
    CaseInsensitivityHelper caseInsensitivityHelper = new CaseInsensitivityHelper();
    globalScopeProvider.setCaseInsensitivityHelper(caseInsensitivityHelper);
    scopeProvider = new ImportednamespaceAwareLocalScopeProvider(globalScopeProvider,nameProvider,nameConverter,caseInsensitivityHelper);
}
项目:xtext-core    文件FQNPrefixMatcher.java   
public String getDelimiter() {
  if ((this.qualifiednameConverter instanceof IQualifiednameConverter.DefaultImpl)) {
    return ((IQualifiednameConverter.DefaultImpl)this.qualifiednameConverter).getDelimiter();
  } else {
    return ".";
  }
}
项目:bts    文件AbstractJavaBasedContentProposalProvider.java   
/**
 * @since 2.1
 */
public DefaultProposalCreator(ContentAssistContext contentAssistContext,String ruleName,IQualifiednameConverter qualifiednameConverter) {
    this.contentAssistContext = contentAssistContext;
    this.ruleName = ruleName;
    this.qualifiednameConverter = qualifiednameConverter;
}
项目:gama    文件GamlRuntimeModule.java   
@Override
public void configure(final Binder binder) {
    super.configure(binder);
    staticInitialize();
    // binder.bind(ExpressionDescriptionBuilder.class);
    // binder.bind(IDocManager.class).to(GamlResourceDocumenter.class);
    // binder.bind(GamlSyntacticConverter.class);
    binder.bind(IDefaultResourceDescriptionStrategy.class).to(GamlResourceDescriptionStrategy.class);
    binder.bind(IQualifiednameConverter.class).to(GamlNameConverter.class);
    binder.bind(IResourceDescription.Manager.class).to(GamlResourceDescriptionManager.class);
    // binder.bind(IoUtputConfigurationProvider.class).to(GamlOutputConfigurationProvider.class);
    binder.bind(IResourceValidator.class).to(GamlResourceValidator.class);
    binder.bind(ErrorToDiagnoticTranslator.class);

}
项目:n4js    文件InternalTypeSystem.java   
public IQualifiednameConverter getQualifiednameConverter() {
  return this.qualifiednameConverter;
}
项目:n4js    文件InternalTypeSystem.java   
public void setQualifiednameConverter(final IQualifiednameConverter qualifiednameConverter) {
  this.qualifiednameConverter = qualifiednameConverter;
}
项目:n4js    文件N4JSRuntimeModule.java   
/**
 * Binds a custom qualified name converter changing the delimiter to "/".
 */
public Class<? extends IQualifiednameConverter> bindIQualifiednameConverter() {
    return N4JSQualifiednameConverter.class;
}
项目:xtext-extras    文件DefaultXbaseRuntimeModule.java   
public Class<? extends IQualifiednameConverter> bindIQualifiednameConverter() {
    return XbaseQualifiednameConverter.class;
}
项目:xtext-extras    文件XImportSectionNamespaceScopeProvider.java   
public IQualifiednameConverter getQualifiednameConverter() {
    return qualifiednameConverter;
}
项目:xtext-extras    文件ClasspathBasedTypeScopeTest.java   
@Before
public void setUp() throws Exception {
    factory = new ClasspathTypeProviderFactory(getClass().getClassLoader(),Predicates.<IEObjectDescription>alwaysTrue());
}
项目:xtext-extras    文件AbstractConstructorScope.java   
public IQualifiednameConverter getQualifiednameConverter() {
    return getTypeScope().getQualifiednameConverter();
}
项目:xtext-extras    文件ClasspathBasedTypeScope.java   
public ClasspathBasedTypeScope(ClasspathTypeProvider typeProvider,Predicate<IEObjectDescription> filter) {
    super(typeProvider,qualifiednameConverter,filter);
}
项目:xtext-extras    文件AbstractTypeScope.java   
public IQualifiednameConverter getQualifiednameConverter() {
    return qualifiednameConverter;
}
项目:xtext-extras    文件ReflectionTypeScope.java   
public ReflectionTypeScope(ReflectionTypeProvider typeProvider,filter);
}
项目:xtext-core    文件ImportednamespaceAwareLocalScopeProvider.java   
/**
 * @since 2.10
 */
public IQualifiednameConverter getQualifiednameConverter() {
    return qualifiednameConverter;
}
项目:xtext-core    文件PartialLinkingTest.java   
@Override
public void setUp() throws Exception {
    super.setUp();
    with(ReferenceGrammarTestLanguageStandalonesetup.class);
    IQualifiednameConverter nameConverter = new IQualifiednameConverter.DefaultImpl();
    IQualifiednameProvider nameProvider = new DefaultDeclarativeQualifiednameProvider();
    ImportUriGlobalScopeProvider globalScopeProvider = new ImportUriGlobalScopeProvider();
    globalScopeProvider.setImportResolver(new ImportUriResolver());
    globalScopeProvider.setCache(IResourceScopeCache.NullImpl.INSTANCE);
    final ResourceDescriptionsprovider provider = new ResourceDescriptionsprovider();
    provider.setResourceDescriptions(new Provider<IResourceDescriptions>() {
        @Override
        public IResourceDescriptions get() {
            return new IResourceDescriptions.NullImpl();
        }
    });
    globalScopeProvider.setResourceDescriptionsprovider(provider);
    globalScopeProvider.setLoadondemandDescriptions(new Provider<LoadondemandResourceDescriptions>() {
        @Override
        public LoadondemandResourceDescriptions get() {
            return PartialLinkingTest.this.get(LoadondemandResourceDescriptions.class);
        }
    });
    CaseInsensitivityHelper caseInsensitivityHelper = new CaseInsensitivityHelper();
    globalScopeProvider.setCaseInsensitivityHelper(caseInsensitivityHelper);
    scopeProvider = new ImportednamespaceAwareLocalScopeProvider(globalScopeProvider,caseInsensitivityHelper);
    modelAsText =
        "spielplatz 1 {\n" +
        "  kind( Bommel1 1)\n" +
        "  kind( Bommel2 2)\n" +
        "  kind( Bommel3 3)\n" +
        "  erwachsener( Bob 4)\n" +
        "  erwachsener( Joe 5)\n" +
        "  familie( Familienname Bob Joe Bommel2 )\n" +
        "}";
    resource = getResourceFromString(modelAsText);
    assertTrue(resource.getErrors().toString(),resource.getErrors().isEmpty());
    model = resource.getParseResult().getRootASTElement();
    final Iterator<EObject> iter = model.eAllContents();
    while (iter.hasNext() && context == null) {
        final EObject candidate = iter.next();
        final String className = candidate.eClass().getName();
        if (className.endsWith("Familie"))
            context = candidate;
    }
    reference = (EReference) context.eClass().getEStructuralFeature("kinder");
}
项目:xtext-core    文件IdeCrossrefProposalProvider.java   
@Pure
protected IQualifiednameConverter getQualifiednameConverter() {
  return this.qualifiednameConverter;
}
项目:xtext-core    文件IdeContentProposalProvider.java   
@Pure
protected IQualifiednameConverter getQualifiednameConverter() {
  return this.qualifiednameConverter;
}
项目:dsl-devkit    文件AbstractExportednameProvider.java   
protected IQualifiednameConverter getConverter() {
  return converter;
}
项目:bts    文件AbstractContentProposalProvider.java   
public IQualifiednameConverter getQualifiednameConverter() {
    return qualifiednameConverter;
}
项目:bts    文件DefaultQuickfixProvider.java   
/**
 * @since 2.0
 */
protected IQualifiednameConverter getQualifiednameConverter() {
    return qualifiednameConverter;
}
项目:gama    文件GamlProposalProvider.java   
/**
 * @param contentAssistContext
 * @param ruleName
 * @param qualifiednameConverter
 */
public GamlProposalCreator(final ContentAssistContext contentAssistContext,final String ruleName,final IQualifiednameConverter qualifiednameConverter) {
    super(contentAssistContext,ruleName,qualifiednameConverter);
    context = contentAssistContext;
}
项目:txtUML    文件XtxtUMLReferenceProposalTypeScope.java   
public XtxtUMLReferenceProposalTypeScope(IJdtTypeProvider typeProvider,filter);
}
项目:sadlos2    文件SadlRuntimeModule.java   
public Class<? extends IQualifiednameConverter> bindIQualifiednameConverter() {
    return SadlQualifiednameConverter.class;
}
项目:dsl-devkit    文件ScopeRuntimeModule.java   
/**
 * binds custom qualified name converter.
 *
 * @return implementation
 */
public Class<? extends IQualifiednameConverter> bindIQualifiednameConverter() {
  return ScopeQualifiednameConverter.class;
}
项目:dsl-devkit    文件FormatRuntimeModule.java   
/**
 * Binds custom qualified name converter.
 *
 * @return the implementation
 */
@Override
public Class<? extends IQualifiednameConverter> bindIQualifiednameConverter() {
  return FormatQualifiednameConverter.class;
}
项目:dsl-devkit    文件ExportRuntimeModule.java   
/**
 * binds custom qualified name converter.
 *
 * @return implementation
 */
public Class<? extends IQualifiednameConverter> bindIQualifiednameConverter() {
  return ExportQualifiednameConverter.class;
}
项目:dsl-devkit    文件Index.java   
/**
 * Creates a new query for a type,using a given domain mapper and name converter.
 *
 * @param mapper
 *          to use
 * @param nameConverter
 *          to use
 * @param type
 *          to look for
 * @return a query object
 */
protected Query(final IDomain.Mapper mapper,final IQualifiednameConverter nameConverter,final EClass type) {
  this.realQuery = ContainerQuery.newBuilder(mapper,type);
  this.nameConverter = nameConverter;
}
项目:dsl-devkit    文件Index.java   
/**
 * Creates a new wrapper for an IEObjectDescription,using the given name converter and query context object. The context object is used to resolve the
 * EObject,if needed.
 *
 * @param context
 *          of the query that produced this result
 * @param nameConverter
 *          to use
 * @param internalDescription
 *          to wrap
 */
protected Entry(final EObject context,final IEObjectDescription internalDescription) {
  this.context = context;
  this.nameConverter = nameConverter;
  this.delegate = internalDescription;
}
项目:dsl-devkit    文件ValidRuntimeModule.java   
/**
 * binds custom qualified name converter.
 * 
 * @return implementation
 */
public Class<? extends IQualifiednameConverter> bindIQualifiednameConverter() {
  return ValidQualifiednameConverter.class;
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...