Skip to content

Commit

Permalink
feat(kotlin): init inserter api
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Jul 31, 2023
1 parent 2fd0695 commit 9c7086a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/main/kotlin/cc/unitmesh/devti/context/builder/CodeInserter.kt
@@ -0,0 +1,10 @@
package cc.unitmesh.devti.context.builder

import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile

interface CodeInserter {
abstract fun insertTestCode(sourceFile: VirtualFile, project: Project, code: String): Boolean
abstract fun insertMethod(sourceFile: VirtualFile, project: Project, code: String): Boolean
abstract fun insertClass(sourceFile: VirtualFile, project: Project, code: String): Boolean
}
Expand Up @@ -26,7 +26,6 @@ abstract class WriteTestService : LazyExtensionInstance<WriteTestService>() {
override fun getImplementationClassName(): String? {
return implementationClass
}

abstract fun isApplicable(element: PsiElement): Boolean

abstract fun findOrCreateTestFile(sourceFile: PsiFile, project: Project, element: PsiElement): TestFileContext?
Expand Down

0 comments on commit 9c7086a

Please sign in to comment.