@@ -20,12 +20,12 @@ import com.intellij.ui.DocumentAdapter
2020import com.intellij.ui.SearchTextField
2121import com.intellij.ui.components.ActionLink
2222import com.intellij.ui.components.JBScrollPane
23+ import com.intellij.ui.dsl.builder.AlignX
24+ import com.intellij.ui.dsl.builder.AlignY
2325import com.intellij.ui.dsl.builder.BottomGap
2426import com.intellij.ui.dsl.builder.RightGap
2527import com.intellij.ui.dsl.builder.TopGap
2628import com.intellij.ui.dsl.builder.panel
27- import com.intellij.ui.dsl.gridLayout.HorizontalAlign
28- import com.intellij.ui.dsl.gridLayout.VerticalAlign
2929import com.intellij.util.ui.JBFont
3030import com.intellij.util.ui.JBUI
3131import com.jetbrains.gateway.api.GatewayRecentConnections
@@ -38,7 +38,7 @@ import kotlinx.coroutines.cancel
3838import kotlinx.coroutines.launch
3939import java.awt.Component
4040import java.awt.Dimension
41- import java.util.Locale
41+ import java.util.*
4242import javax.swing.JComponent
4343import javax.swing.JLabel
4444import javax.swing.event.DocumentEvent
@@ -65,14 +65,15 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
6565 panel {
6666 indent {
6767 row {
68- cell(JLabel ()).resizableColumn().horizontalAlign( HorizontalAlign .FILL )
69- searchBar = cell(SearchTextField (false )).resizableColumn().horizontalAlign( HorizontalAlign .FILL ).applyToComponent {
68+ cell(JLabel ()).resizableColumn().align( AlignX .FILL )
69+ searchBar = cell(SearchTextField (false )).resizableColumn().align( AlignX .FILL ).applyToComponent {
7070 minimumSize = Dimension (350 , - 1 )
7171 textEditor.border = JBUI .Borders .empty(2 , 5 , 2 , 0 )
7272 addDocumentListener(object : DocumentAdapter () {
7373 override fun textChanged (e : DocumentEvent ) {
7474 val toSearchFor = this @applyToComponent.text
75- val filteredConnections = recentConnectionsService.getAllRecentConnections().filter { it.coderWorkspaceHostname?.lowercase(Locale .getDefault())?.contains(toSearchFor) ? : false || it.projectPath?.lowercase(Locale .getDefault())?.contains(toSearchFor) ? : false }
75+ val filteredConnections = recentConnectionsService.getAllRecentConnections()
76+ .filter { it.coderWorkspaceHostname?.lowercase(Locale .getDefault())?.contains(toSearchFor) ? : false || it.projectPath?.lowercase(Locale .getDefault())?.contains(toSearchFor) ? : false }
7677 updateContentView(filteredConnections.groupBy { it.coderWorkspaceHostname })
7778 }
7879 })
@@ -92,7 +93,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
9293 separator(background = WelcomeScreenUIManager .getSeparatorColor())
9394 row {
9495 resizableRow()
95- cell(recentWorkspacesContentPanel).resizableColumn().horizontalAlign( HorizontalAlign .FILL ).verticalAlign( VerticalAlign .FILL ).component
96+ cell(recentWorkspacesContentPanel).resizableColumn().align( AlignX .FILL ).align( AlignY .FILL ).component
9697 }
9798 }
9899 }.apply {
@@ -114,7 +115,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
114115 if (hostname != null ) {
115116 label(hostname).applyToComponent {
116117 font = JBFont .h3().asBold()
117- }.horizontalAlign( HorizontalAlign .LEFT ).gap(RightGap .SMALL )
118+ }.align( AlignX .LEFT ).gap(RightGap .SMALL )
118119 actionButton(object : DumbAwareAction (CoderGatewayBundle .message(" gateway.connector.recentconnections.terminal.button.tooltip" ), " " , CoderIcons .OPEN_TERMINAL ) {
119120 override fun actionPerformed (e : AnActionEvent ) {
120121 BrowserUtil .browse(recentConnections[0 ].webTerminalLink ? : " " )
@@ -132,7 +133,7 @@ class CoderGatewayRecentWorkspaceConnectionsView(private val setContentCallback:
132133 GatewayUI .getInstance().connect(connectionDetails.toWorkspaceParams())
133134 }
134135 })
135- label(" " ).resizableColumn().horizontalAlign( HorizontalAlign .FILL )
136+ label(" " ).resizableColumn().align( AlignX .FILL )
136137 label(" Last opened: ${connectionDetails.lastOpened} " ).applyToComponent {
137138 foreground = JBUI .CurrentTheme .ContextHelp .FOREGROUND
138139 font = ComponentPanelBuilder .getCommentFont(font)
0 commit comments