public class JavaTestFinder extends java.lang.Object implements TestFinder
EP_NAME
Constructor and Description |
---|
JavaTestFinder() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<PsiElement> |
findClassesForTest(PsiElement element)
Finds classes for given test.
|
PsiClass |
findSourceElement(PsiElement element)
Retrieve the source element (PsiFile) to handle some UI elements, like the name displayed in "Choose Test for {file name}".
|
java.util.Collection<PsiElement> |
findTestsForClass(PsiElement element)
Finds tests for given class.
|
protected GlobalSearchScope |
getSearchScope(PsiElement element,
boolean dependencies) |
boolean |
isTest(PsiElement element) |
protected boolean |
isTestClass(PsiClass eachClass,
PsiClass klass) |
protected boolean |
isTestSubjectClass(PsiClass klass) |
public PsiClass findSourceElement(PsiElement element)
TestFinder
findSourceElement
in interface TestFinder
element
- PsiElement where the cursor was when "Navigate to test" was triggeredpublic java.util.Collection<PsiElement> findClassesForTest(PsiElement element)
TestFinder
findClassesForTest
in interface TestFinder
element
- may by of any language but not specific to a current test finder domain languageprotected GlobalSearchScope getSearchScope(PsiElement element, boolean dependencies)
protected boolean isTestSubjectClass(PsiClass klass)
public java.util.Collection<PsiElement> findTestsForClass(PsiElement element)
TestFinder
findTestsForClass
in interface TestFinder
element
- may by of any language but not specific to a current test finder domain languagepublic boolean isTest(PsiElement element)
isTest
in interface TestFinder