Skip to content

Commit ad7fc60

Browse files
committed
refactor(devti): remove unused imports and simplify enum handling
- Remove unused imports in BridgeToolWindow.kt- Simplify BuiltinRefactorCommand enum handling by using 'entries' instead of 'values()'
1 parent 0bef83f commit ad7fc60

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

core/src/main/kotlin/cc/unitmesh/devti/bridge/BridgeToolWindow.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ package cc.unitmesh.devti.bridge
33
import cc.unitmesh.devti.gui.chat.message.ChatActionType
44
import cc.unitmesh.devti.sketch.SketchInputListener
55
import cc.unitmesh.devti.sketch.SketchToolWindow
6-
import com.intellij.openapi.application.invokeLater
76
import com.intellij.openapi.editor.Editor
8-
import com.intellij.openapi.progress.ProgressIndicator
9-
import com.intellij.openapi.progress.ProgressManager
10-
import com.intellij.openapi.progress.Task
11-
import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator
127
import com.intellij.openapi.project.Project
138

149
class BridgeToolWindow(val myProject: Project, val myEditor: Editor?, private val showInput: Boolean = false) :

core/src/main/kotlin/cc/unitmesh/devti/command/dataprovider/BuiltinRefactorCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ enum class BuiltinRefactorCommand(val funcName: String, val description: String)
99

1010
companion object {
1111
fun all(): List<BuiltinRefactorCommand> {
12-
return values().toList()
12+
return entries
1313
}
1414

1515
fun fromString(command: String): BuiltinRefactorCommand? {
16-
return values().find { it.name.equals(command, ignoreCase = true) }
16+
return entries.find { it.name.equals(command, ignoreCase = true) }
1717
}
1818
}
1919
}

0 commit comments

Comments
 (0)