Skip to content

Commit fdefe3e

Browse files
committed
refactor(gui): rename file search components for consistency
- Rename FileSearchPopup to WorkspaceFileSearchPopup - Rename InputFileToolbar to WorkspaceFileToolbar- Update related imports and usages in affected classes
1 parent 20090df commit fdefe3e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/AutoDevInputSection.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import cc.unitmesh.devti.AutoDevBundle
44
import cc.unitmesh.devti.AutoDevIcons
55
import cc.unitmesh.devti.agent.custom.model.CustomAgentConfig
66
import cc.unitmesh.devti.agent.custom.model.CustomAgentState
7-
import cc.unitmesh.devti.gui.chat.ui.file.InputFileToolbar
7+
import cc.unitmesh.devti.gui.chat.ui.file.WorkspaceFileToolbar
88
import cc.unitmesh.devti.gui.chat.ui.file.RelatedFileListCellRenderer
99
import cc.unitmesh.devti.gui.chat.ui.file.WorkspaceFilePanel
1010
import cc.unitmesh.devti.gui.chat.ui.viewmodel.FileListViewModel
@@ -178,7 +178,7 @@ class AutoDevInputSection(private val project: Project, val disposable: Disposab
178178
scrollPane.verticalScrollBarPolicy = JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED
179179
scrollPane.horizontalScrollBarPolicy = JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED
180180

181-
val toolbar = InputFileToolbar.createToolbar(project, fileListViewModel, input)
181+
val toolbar = WorkspaceFileToolbar.createToolbar(project, fileListViewModel, input)
182182

183183
val headerPanel = JPanel(BorderLayout())
184184
headerPanel.add(toolbar, BorderLayout.NORTH)

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/WorkspaceFilePanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class WorkspaceFilePanel(private val project: Project) : JPanel(BorderLayout())
4646
}
4747

4848
private fun showFileSearchPopup(component: JComponent) {
49-
val popup = FileSearchPopup(project) { files ->
49+
val popup = WorkspaceFileSearchPopup(project) { files ->
5050
for (file in files) {
5151
addFileToWorkspace(file)
5252
}

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/FileSearchPopup.kt renamed to core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/WorkspaceFileSearchPopup.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import javax.swing.*
2424
import javax.swing.event.DocumentEvent
2525
import javax.swing.event.DocumentListener
2626

27-
class FileSearchPopup(
27+
class WorkspaceFileSearchPopup(
2828
private val project: Project,
2929
private val onFilesSelected: (List<VirtualFile>) -> Unit
3030
) {

core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/InputFileToolbar.kt renamed to core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/WorkspaceFileToolbar.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import java.awt.Component
1616
import java.awt.Container
1717
import kotlin.collections.forEach
1818

19-
object InputFileToolbar {
19+
object WorkspaceFileToolbar {
2020
fun createToolbar(project: Project, viewModel: FileListViewModel, input: AutoDevInput): JToolBar {
2121
val toolbar = JToolBar()
2222
toolbar.isFloatable = false

0 commit comments

Comments
 (0)