File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin
utbot-intellij-python/src/main/kotlin/org/utbot/intellij/plugin/language/python
utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/models Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import com.jetbrains.python.refactoring.classes.PyMemberInfoStorage
15
15
import com.jetbrains.python.refactoring.classes.membersManager.PyMemberInfo
16
16
import com.jetbrains.python.refactoring.classes.ui.PyMemberSelectionTable
17
17
import org.utbot.framework.UtSettings
18
+ import org.utbot.framework.codegen.domain.ProjectType
18
19
import org.utbot.intellij.plugin.settings.Settings
19
20
import java.awt.BorderLayout
20
21
import java.util.concurrent.TimeUnit
@@ -171,6 +172,7 @@ class PythonDialogWindow(val model: PythonTestsModel) : DialogWrapper(model.proj
171
172
model.testFramework = testFrameworks.item
172
173
model.timeout = TimeUnit .SECONDS .toMillis(timeoutSpinnerForTotalTimeout.number.toLong())
173
174
model.testSourceRootPath = testSourceFolderField.text
175
+ model.projectType = ProjectType .PYTHON
174
176
175
177
val settings = model.project.service<Settings >()
176
178
with (settings) {
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import com.intellij.refactoring.util.classMembers.MemberInfo
18
18
import org.jetbrains.kotlin.psi.KtFile
19
19
import org.utbot.framework.SummariesGenerationType
20
20
import org.utbot.framework.UtSettings
21
- import org.utbot.framework.codegen.domain.ProjectType
22
21
import org.utbot.framework.codegen.domain.TypeReplacementApproach
23
22
import org.utbot.framework.plugin.api.JavaDocCommentStyle
24
23
import org.utbot.framework.util.ConflictTriggers
@@ -43,8 +42,6 @@ class GenerateTestsModel(
43
42
override var sourceRootHistory = project.service<Settings >().sourceRootHistory
44
43
override var codegenLanguage = project.service<Settings >().codegenLanguage
45
44
46
- lateinit var projectType: ProjectType
47
-
48
45
lateinit var testFramework: TestFramework
49
46
lateinit var mockStrategy: MockStrategyApi
50
47
lateinit var mockFramework: MockFramework
Original file line number Diff line number Diff line change @@ -526,7 +526,7 @@ class GenerateTestsDialogWindow(val model: GenerateTestsModel) : DialogWrapper(m
526
526
model.testSourceRoot?.apply { model.updateSourceRootHistory(this .toNioPath().toString()) }
527
527
528
528
// TODO: obtain this values from UI controls https://github.com/UnitTestBot/UTBotJava/issues/1929
529
- model.projectType = ProjectType .SPRING
529
+ model.projectType = ProjectType .PURE_JVM
530
530
model.typeReplacementApproach = TypeReplacementApproach .DO_NOT_REPLACE
531
531
532
532
val settings = model.project.service<Settings >()
Original file line number Diff line number Diff line change @@ -10,13 +10,12 @@ import com.intellij.openapi.vfs.newvfs.impl.FakeVirtualFile
10
10
import com.intellij.psi.JavaPsiFacade
11
11
import com.intellij.psi.PsiClass
12
12
import com.intellij.psi.search.GlobalSearchScope
13
- import com.intellij.psi.search.ProjectScope
14
13
import com.intellij.psi.search.searches.AnnotatedElementsSearch
15
14
import org.jetbrains.kotlin.idea.core.getPackage
16
- import org.jetbrains.kotlin.idea.search.allScope
17
15
import org.jetbrains.kotlin.idea.util.projectStructure.allModules
18
16
import org.jetbrains.kotlin.idea.util.rootManager
19
17
import org.jetbrains.kotlin.idea.util.sourceRoot
18
+ import org.utbot.framework.codegen.domain.ProjectType
20
19
import org.utbot.framework.plugin.api.CodegenLanguage
21
20
import org.utbot.intellij.plugin.ui.utils.ITestSourceRoot
22
21
import org.utbot.intellij.plugin.ui.utils.getSortedTestRoots
@@ -40,6 +39,7 @@ open class BaseTestsModel(
40
39
var testPackageName: String? = null
41
40
open var sourceRootHistory : MutableList <String > = mutableListOf ()
42
41
open lateinit var codegenLanguage: CodegenLanguage
42
+ open lateinit var projectType: ProjectType
43
43
44
44
fun setSourceRootAndFindTestModule (newTestSourceRoot : VirtualFile ? ) {
45
45
requireNotNull(newTestSourceRoot)
You can’t perform that action at this time.
0 commit comments