Skip to content

Commit 2592b89

Browse files
tamarinvs19denis-fokin
authored andcommitted
Fix Python plugin locking UI (#1576)
(cherry picked from commit 4c3c40f)
1 parent 5d5896a commit 2592b89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utbot-intellij-python/src/main/kotlin/org/utbot/intellij/plugin/language/python/PythonLanguageAssistant.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import com.jetbrains.python.psi.PyFunction
1212
import com.jetbrains.python.sdk.PythonSdkType
1313
import org.jetbrains.kotlin.idea.util.projectStructure.module
1414
import org.jetbrains.kotlin.idea.util.projectStructure.sdk
15+
import org.utbot.framework.plugin.api.util.LockFile
1516
import org.utbot.intellij.plugin.language.agnostic.LanguageAssistant
1617

1718
object PythonLanguageAssistant : LanguageAssistant() {
@@ -40,7 +41,7 @@ object PythonLanguageAssistant : LanguageAssistant() {
4041
}
4142

4243
override fun update(e: AnActionEvent) {
43-
e.presentation.isEnabled = getPsiTargets(e) != null
44+
e.presentation.isEnabled = !LockFile.isLocked() && getPsiTargets(e) != null
4445
}
4546

4647
private fun getPsiTargets(e: AnActionEvent): Targets? {

0 commit comments

Comments
 (0)