Skip to content

Commit

Permalink
fix(devins-lang): improve file selection message #100
Browse files Browse the repository at this point in the history
The commit modifies the file DevInsSettingsEditor.kt to improve the file selection message by creating a separate variable for the message and using it in the addBrowseFolderListener method. This change enhances code readability and maintainability.
  • Loading branch information
phodal committed Mar 22, 2024
1 parent b0740cd commit 35f950a
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -13,12 +13,10 @@ class DevInsSettingsEditor(val project: Project) : SettingsEditor<DevInsConfigur
private val myScriptSelector: TextFieldWithBrowseButton = TextFieldWithBrowseButton()

init {
myScriptSelector.addBrowseFolderListener(
DevInBundle.message("devin.label.choose.file"),
"",
project,
FileChooserDescriptorFactory.createSingleFileDescriptor()
)
val descriptor = FileChooserDescriptorFactory.createSingleFileDescriptor()
val message = DevInBundle.message("devin.label.choose.file")

myScriptSelector.addBrowseFolderListener(message, "", project, descriptor)
}

override fun createEditor(): JComponent = panel {
Expand Down

0 comments on commit 35f950a

Please sign in to comment.