File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
apps/intellij/src/main/kotlin/dev/nx/console/generate Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import com.intellij.openapi.ui.ValidationInfo
1212import com.intellij.ui.TextFieldWithAutoCompletion
1313import com.intellij.ui.components.JBTextField
1414import com.intellij.ui.dsl.builder.*
15+ import com.intellij.util.applyIf
1516import dev.nx.console.models.NxGeneratorContext
1617import dev.nx.console.models.WorkspaceLayout
1718import java.awt.event.ActionEvent
@@ -84,6 +85,11 @@ class NxReMoveProjectDialog(
8485 )
8586 .comment(getShortcutHint())
8687 .align(AlignX .FILL )
88+ .applyIf(
89+ reMoveGeneratorContext?.project.isNullOrEmpty()
90+ ) {
91+ focused()
92+ }
8793
8894 addDocumentListener(
8995 object : BulkAwareDocumentListener .Simple {
@@ -115,7 +121,13 @@ class NxReMoveProjectDialog(
115121 updateDestinationDirHint(model.project)
116122
117123 destinationField =
118- textField().bindText(model::directory).align(AlignX .FILL ).component
124+ textField()
125+ .bindText(model::directory)
126+ .align(AlignX .FILL )
127+ .applyIf(! reMoveGeneratorContext?.project.isNullOrEmpty()) {
128+ focused()
129+ }
130+ .component
119131 }
120132 .visible(mode == " move" )
121133 .layout(RowLayout .PARENT_GRID )
You can’t perform that action at this time.
0 commit comments