本文整理汇总了Java中org.eclipse.xtext.naming.IQualifiedNameConverter类的典型用法代码示例。如果您正苦于以下问题:Java IQualifiedNameConverter类的具体用法?Java IQualifiedNameConverter怎么用?Java IQualifiedNameConverter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IQualifiedNameConverter类属于org.eclipse.xtext.naming包,在下文中一共展示了IQualifiedNameConverter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: IsInScopeWithOptionalPositionPredicate
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
public IsInScopeWithOptionalPositionPredicate(IQualifiedNameConverter converter, URI currentURI,
boolean withLineNumber, IScope scope) {
super();
this.converter = converter;
this.scope = scope;
this.currentURI = currentURI;
this.withLineNumber = withLineNumber;
}
示例2: setUp
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
@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);
}
示例3: testGetElementByInstance_01
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
@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());
}
示例4: AbstractTypeScope
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
protected AbstractTypeScope(IJvmTypeProvider typeProvider, IQualifiedNameConverter qualifiedNameConverter,
Predicate<IEObjectDescription> filter) {
super(IScope.NULLSCOPE, false);
this.typeProvider = typeProvider;
this.qualifiedNameConverter = qualifiedNameConverter;
this.filter = filter;
}
示例5: ImportedNamespaceAwareLocalScopeProvider
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
public ImportedNamespaceAwareLocalScopeProvider(IGlobalScopeProvider globalScopeProvider,
IQualifiedNameProvider qualifiedNameProvider, IQualifiedNameConverter qualifiedNameConverter,
ICaseInsensitivityHelper caseInsensitivityHelper) {
super(globalScopeProvider, caseInsensitivityHelper);
this.qualifiedNameProvider = qualifiedNameProvider;
this.qualifiedNameConverter = qualifiedNameConverter;
}
示例6: setUp
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
@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);
}
示例7: getDelimiter
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
public String getDelimiter() {
if ((this.qualifiedNameConverter instanceof IQualifiedNameConverter.DefaultImpl)) {
return ((IQualifiedNameConverter.DefaultImpl)this.qualifiedNameConverter).getDelimiter();
} else {
return ".";
}
}
示例8: DefaultProposalCreator
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
/**
* @since 2.1
*/
public DefaultProposalCreator(ContentAssistContext contentAssistContext, String ruleName,
IQualifiedNameConverter qualifiedNameConverter) {
this.contentAssistContext = contentAssistContext;
this.ruleName = ruleName;
this.qualifiedNameConverter = qualifiedNameConverter;
}
示例9: configure
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
@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);
}
示例10: getQualifiedNameConverter
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
public IQualifiedNameConverter getQualifiedNameConverter() {
return this.qualifiedNameConverter;
}
示例11: setQualifiedNameConverter
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
public void setQualifiedNameConverter(final IQualifiedNameConverter qualifiedNameConverter) {
this.qualifiedNameConverter = qualifiedNameConverter;
}
示例12: bindIQualifiedNameConverter
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
/**
* Binds a custom qualified name converter changing the delimiter to "/".
*/
public Class<? extends IQualifiedNameConverter> bindIQualifiedNameConverter() {
return N4JSQualifiedNameConverter.class;
}
示例13: bindIQualifiedNameConverter
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
public Class<? extends IQualifiedNameConverter> bindIQualifiedNameConverter() {
return XbaseQualifiedNameConverter.class;
}
示例14: getQualifiedNameConverter
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
public IQualifiedNameConverter getQualifiedNameConverter() {
return qualifiedNameConverter;
}
示例15: setUp
import org.eclipse.xtext.naming.IQualifiedNameConverter; //导入依赖的package包/类
@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());
}