Search in sources :

Example 1 with PathListReferenceProvider

use of com.intellij.psi.impl.source.resolve.reference.impl.providers.PathListReferenceProvider in project intellij-community by JetBrains.

the class TestNGSuiteReferenceContributor method registerReferenceProviders.

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;
        }
    });
}
Also used : JavaClassReferenceProvider(com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider) PathListReferenceProvider(com.intellij.psi.impl.source.resolve.reference.impl.providers.PathListReferenceProvider)

Aggregations

JavaClassReferenceProvider (com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider)1 PathListReferenceProvider (com.intellij.psi.impl.source.resolve.reference.impl.providers.PathListReferenceProvider)1