本文整理汇总了Java中com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider.setOption方法的典型用法代码示例。如果您正苦于以下问题:Java JavaClassReferenceProvider.setOption方法的具体用法?Java JavaClassReferenceProvider.setOption怎么用?Java JavaClassReferenceProvider.setOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider
的用法示例。
在下文中一共展示了JavaClassReferenceProvider.setOption方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createJavaClassReferenceProvider
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider; //导入方法依赖的package包/类
public static JavaClassReferenceProvider createJavaClassReferenceProvider(final GenericDomValue genericDomValue,
ExtendClass extendClass,
final JavaClassReferenceProvider provider) {
if (extendClass != null) {
if (StringUtil.isNotEmpty(extendClass.value())) {
provider.setOption(JavaClassReferenceProvider.EXTEND_CLASS_NAMES, new String[]{extendClass.value()});
}
if (extendClass.instantiatable()) {
provider.setOption(JavaClassReferenceProvider.INSTANTIATABLE, Boolean.TRUE);
}
if (!extendClass.allowAbstract()) {
provider.setOption(JavaClassReferenceProvider.CONCRETE, Boolean.TRUE);
}
if (!extendClass.allowInterface()) {
provider.setOption(JavaClassReferenceProvider.NOT_INTERFACE, Boolean.TRUE);
}
if (!extendClass.allowEnum()) {
provider.setOption(JavaClassReferenceProvider.NOT_ENUM, Boolean.TRUE);
}
if (extendClass.jvmFormat()) {
provider.setOption(JavaClassReferenceProvider.JVM_FORMAT, Boolean.TRUE);
}
provider.setAllowEmpty(extendClass.allowEmpty());
}
ClassTemplate template = genericDomValue.getAnnotation(ClassTemplate.class);
if (template != null) {
if (StringUtil.isNotEmpty(template.value())) {
provider.setOption(JavaClassReferenceProvider.CLASS_TEMPLATE, template.value());
}
provider.setOption(JavaClassReferenceProvider.CLASS_KIND, template.kind());
}
provider.setSoft(true);
return provider;
}
示例2: createClassReferenceProvider
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider; //导入方法依赖的package包/类
@Override
protected JavaClassReferenceProvider createClassReferenceProvider(GenericDomValue<PsiClass> genericDomValue,
ConvertContext context,
ExtendClass extendClass) {
final JavaClassReferenceProvider provider = super.createClassReferenceProvider(genericDomValue, context,
extendClass);
provider.setOption(JavaClassReferenceProvider.CLASS_KIND, ClassKind.ANNOTATION);
return provider;
}
示例3: registerReferenceProviders
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider; //导入方法依赖的package包/类
public void registerReferenceProviders(@NotNull PsiReferenceRegistrar registrar) {
registrar.registerReferenceProvider(ourTestClassPattern, new JavaClassReferenceProvider());
registrar.registerReferenceProvider(ourListenerClassPattern, new JavaClassReferenceProvider());
final JavaClassReferenceProvider methodSelectorProvider = new JavaClassReferenceProvider();
methodSelectorProvider.setOption(JavaClassReferenceProvider.EXTEND_CLASS_NAMES, new String[]{"org.testng.IMethodSelector"});
registrar.registerReferenceProvider(ourMethodSelectorPattern, methodSelectorProvider);
registrar.registerReferenceProvider(ourSuiteFilePattern, new PathListReferenceProvider(){
@Override
protected boolean disableNonSlashedPaths() {
return false;
}
});
}
示例4: createClassReferenceProvider
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider; //导入方法依赖的package包/类
@Override
protected JavaClassReferenceProvider createClassReferenceProvider(GenericDomValue<PsiClass> genericDomValue,
ConvertContext context,
ExtendClass extendClass) {
final JavaClassReferenceProvider provider = super.createClassReferenceProvider(genericDomValue, context, extendClass);
provider.setOption(JavaClassReferenceProvider.JVM_FORMAT, Boolean.TRUE);
provider.setOption(JavaClassReferenceProvider.ALLOW_DOLLAR_NAMES, Boolean.TRUE);
return provider;
}
示例5: registerReferenceProviders
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider; //导入方法依赖的package包/类
@Override
public void registerReferenceProviders(PsiReferenceRegistrar registrar) {
JavaClassReferenceProvider provider = new JavaClassReferenceProvider();
provider.setOption(JavaClassReferenceProvider.CLASS_KIND, ClassKind.CLASS);
registrar.registerReferenceProvider(
JavaClassQualifiedNameReference.PATTERN, new JavaClassReferenceProvider());
}
示例6: createClassReferenceProvider
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider; //导入方法依赖的package包/类
@Override
protected JavaClassReferenceProvider createClassReferenceProvider(GenericDomValue<PsiClass> genericDomValue,
ConvertContext context,
ExtendClass extendClass) {
final JavaClassReferenceProvider provider = super.createClassReferenceProvider(genericDomValue, context,
extendClass);
provider.setOption(JavaClassReferenceProvider.CLASS_KIND, ClassKind.ANNOTATION);
//provider.setOption(JavaClassReferenceProvider.EXTEND_CLASS_NAMES, new String[] {"org.springframework.samples.petclinic.jsr330.Foo"});
//
return provider;
}
示例7: registerReferenceProviders
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider; //导入方法依赖的package包/类
public void registerReferenceProviders(PsiReferenceRegistrar registrar) {
registrar.registerReferenceProvider(ourTestClassPattern, new JavaClassReferenceProvider());
registrar.registerReferenceProvider(ourListenerClassPattern, new JavaClassReferenceProvider());
final JavaClassReferenceProvider methodSelectorProvider = new JavaClassReferenceProvider();
methodSelectorProvider.setOption(JavaClassReferenceProvider.EXTEND_CLASS_NAMES, new String[]{"org.testng.IMethodSelector"});
registrar.registerReferenceProvider(ourMethodSelectorPattern, methodSelectorProvider);
registrar.registerReferenceProvider(ourSuiteFilePattern, new PathListReferenceProvider(){
@Override
protected boolean disableNonSlashedPaths() {
return false;
}
});
}