Skip to content

Commit

Permalink
Use new overload of Row.textFieldWithBrowseButton
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Oct 3, 2024
1 parent e3a80d1 commit 338a6c1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/main/kotlin/insyncwithfoo/ryecharm/UIExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@ import com.intellij.ui.dsl.builder.bindText
import javax.swing.JComponent


internal fun Row.singleFileTextField() =
textFieldWithBrowseButton(fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor())
internal fun Row.singleFileTextField(): Cell<TextFieldWithBrowseButton> {
val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor()
val (project, fileChosen) = Pair(null, null)

return textFieldWithBrowseButton(fileChooserDescriptor, project, fileChosen)
}


internal fun Row.singleFolderTextField() =
textFieldWithBrowseButton(fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor())
internal fun Row.singleFolderTextField(): Cell<TextFieldWithBrowseButton> {
val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor()
val (project, fileChosen) = Pair(null, null)

return textFieldWithBrowseButton(fileChooserDescriptor, project, fileChosen)
}


internal fun <C : JComponent> Cell<C>.applyReturningComponent(block: Cell<C>.() -> Unit) =

Check warning on line 31 in src/main/kotlin/insyncwithfoo/ryecharm/UIExtensions.kt

View workflow job for this annotation

GitHub Actions / Qodana for JVM

Unused symbol

Function "applyReturningComponent" is never used
Expand Down

0 comments on commit 338a6c1

Please sign in to comment.