File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed
Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ plugins {
1111}
1212
1313group = " dev.huyaro.gen"
14- version = " 0.2.7 "
14+ version = " 0.2.8 "
1515
1616repositories {
1717 mavenCentral()
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import com.intellij.ide.util.TreeJavaClassChooserDialog
99import com.intellij.openapi.actionSystem.ActionUpdateThread
1010import com.intellij.openapi.actionSystem.AnAction
1111import com.intellij.openapi.actionSystem.AnActionEvent
12+ import com.intellij.openapi.fileChooser.FileChooser
1213import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
1314import com.intellij.openapi.project.Project
1415import com.intellij.openapi.ui.ComboBox
@@ -150,14 +151,20 @@ class GeneratorDialog(
150151 }
151152 }.layout(RowLayout .PARENT_GRID )
152153
153- row(" OutputDir: " ) {
154- outDir = textFieldWithBrowseButton(
155- project = project,
156- fileChooserDescriptor = FileChooserDescriptorFactory .createSingleFolderDescriptor()
157- ).bindText(options::outputDir)
154+ row(" Output: " ) {
155+ val textField = textField()
156+ .bindText(options::outputDir) // 绑定到 options.outputDir
158157 .gap(RightGap .SMALL )
159158 .align(AlignX .FILL )
160- }.layout(RowLayout .PARENT_GRID )
159+ .resizableColumn()
160+ .component
161+
162+ button(" Browse..." ) {
163+ val descriptor = FileChooserDescriptorFactory .createSingleFolderDescriptor()
164+ val selectedFolder = FileChooser .chooseFile(descriptor, project, null )
165+ selectedFolder?.let { textField.text = it.path }
166+ }
167+ }.layout(RowLayout .INDEPENDENT )
161168 .rowComment(" Select the output directory. e.g.: /Project/src/main/java" )
162169
163170 twoColumnsRow({
Original file line number Diff line number Diff line change 2424 </ul>
2525 ]]> </description >
2626 <change-notes ><![CDATA[
27+ <h4>0.2.8</h4>
28+ <ul>
29+ <li>Fixed compatibility issues</li>
30+ </ul>
2731 <h4>0.2.7</h4>
2832 <ul>
2933 <li>Compatible versions 241-251.*</li>
You can’t perform that action at this time.
0 commit comments