fix: file path browse buttons in run configs
This commit is contained in:
parent
0a5a765eaf
commit
46069b9a22
2 changed files with 11 additions and 10 deletions
|
@ -29,6 +29,9 @@ Changelog structure reference:
|
|||
|
||||
### Fixed
|
||||
|
||||
- Project
|
||||
- File path browse buttons in zig run configurations didn't work
|
||||
|
||||
- Zig
|
||||
- IPC wrapper wasn't passing exit code
|
||||
|
||||
|
|
|
@ -33,11 +33,11 @@ import com.intellij.openapi.options.SettingsEditor
|
|||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.ui.ComboBox
|
||||
import com.intellij.openapi.ui.TextBrowseFolderListener
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.util.io.toNioPathOrNull
|
||||
import com.intellij.ui.components.JBCheckBox
|
||||
import com.intellij.ui.components.JBTextField
|
||||
import com.intellij.ui.components.textFieldWithBrowseButton
|
||||
import com.intellij.ui.dsl.builder.AlignX
|
||||
import com.intellij.ui.dsl.builder.Panel
|
||||
import com.intellij.ui.dsl.builder.panel
|
||||
|
@ -161,12 +161,10 @@ class WorkDirectoryConfigurable(@Transient override val serializedName: String)
|
|||
}
|
||||
|
||||
class WorkDirectoryConfigModule(private val serializedName: String) : PathConfigModule<WorkDirectoryConfigurable>() {
|
||||
private val field = TextFieldWithBrowseButton(
|
||||
TextBrowseFolderListener(
|
||||
private val field = textFieldWithBrowseButton(
|
||||
null,
|
||||
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle(ZigBrainsBundle.message("dialog.title.working-directory"))
|
||||
),
|
||||
this
|
||||
)
|
||||
).also { Disposer.register(this, it) }
|
||||
|
||||
override var stringValue by field::text
|
||||
|
||||
|
@ -201,9 +199,9 @@ class FilePathConfigurable(
|
|||
}
|
||||
|
||||
class FilePathConfigModule(private val serializedName: String, @Nls private val label: String) : PathConfigModule<FilePathConfigurable>() {
|
||||
private val field = TextFieldWithBrowseButton(
|
||||
TextBrowseFolderListener(FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor()),
|
||||
this
|
||||
private val field = textFieldWithBrowseButton(
|
||||
null,
|
||||
FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor(),
|
||||
)
|
||||
|
||||
override var stringValue by field::text
|
||||
|
|
Loading…
Add table
Reference in a new issue