generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(devins-android): init Android test service support
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
exts/ext-android/src/main/kotlin/cc/unitmesh/android/provider/AndroidTestService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package cc.unitmesh.android.provider | ||
|
||
import cc.unitmesh.devti.context.ClassContext | ||
import cc.unitmesh.devti.provider.AutoTestService | ||
import cc.unitmesh.devti.provider.context.TestFileContext | ||
import com.intellij.execution.configurations.RunProfile | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.psi.PsiElement | ||
import com.intellij.psi.PsiFile | ||
import org.jetbrains.android.util.AndroidUtils | ||
import org.jetbrains.kotlin.psi.KtFile | ||
|
||
class AndroidTestService: AutoTestService() { | ||
override fun isApplicable(element: PsiElement): Boolean = AndroidUtils.hasAndroidFacets(element.project) | ||
override fun psiFileClass(project: Project): Class<out PsiElement> = KtFile::class.java | ||
|
||
override fun runConfigurationClass(project: Project): Class<out RunProfile>? { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun findOrCreateTestFile(sourceFile: PsiFile, project: Project, element: PsiElement): TestFileContext? { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun lookupRelevantClass(project: Project, element: PsiElement): List<ClassContext> { | ||
TODO("Not yet implemented") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters