You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/ide/jetbrains/gateway-plugin/src/main/kotlin/io/gitpod/jetbrains/gateway/GitpodConnectionProvider.kt
+30-26Lines changed: 30 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -74,10 +74,11 @@ class GitpodConnectionProvider : GatewayConnectionProvider {
74
74
val connectParams =ConnectParams(
75
75
parameters["gitpodHost"]!!,
76
76
parameters["workspaceId"]!!,
77
-
parameters["backendPort"]
77
+
parameters["backendPort"],
78
+
parameters["debugWorkspace"] =="true"
78
79
)
79
80
80
-
val connectionKeyId ="${connectParams.gitpodHost}-${connectParams.workspaceId}-${connectParams.backendPort}"
81
+
var connectionKeyId ="${connectParams.gitpodHost}-${connectParams.resolvedWorkspaceId}-${connectParams.backendPort}"
81
82
82
83
var found =true
83
84
val connectionLifetime = activeConnections.computeIfAbsent(connectionKeyId) {
@@ -88,7 +89,7 @@ class GitpodConnectionProvider : GatewayConnectionProvider {
88
89
if (found) {
89
90
val message =
90
91
"You are trying to connect to a workspace that has a client already open. Check for opened JetBrains clients on your machine"
91
-
val title ="${connectParams.workspaceId} (${connectParams.gitpodHost})"
92
+
val title = connectParams.title
92
93
val okButton =Messages.getOkButton()
93
94
val options = arrayOf(okButton)
94
95
val defaultIndex =0
@@ -104,8 +105,8 @@ class GitpodConnectionProvider : GatewayConnectionProvider {
104
105
}
105
106
106
107
val client = gitpod.obtainClient(connectParams.gitpodHost)
107
-
val updates = client.listenToWorkspace(connectionLifetime, connectParams.workspaceId)
108
-
val workspace = client.syncWorkspace(connectParams.workspaceId).workspace
108
+
val updates = client.listenToWorkspace(connectionLifetime, connectParams.actualWorkspaceId)
109
+
val workspace = client.syncWorkspace(connectParams.actualWorkspaceId).workspace
109
110
110
111
val phaseMessage =JLabel()
111
112
val statusMessage =JLabel()
@@ -120,7 +121,7 @@ class GitpodConnectionProvider : GatewayConnectionProvider {
120
121
background = phaseMessage.background
121
122
columns =30
122
123
}
123
-
varideUrl=""
124
+
varresolvedIdeUrl=""
124
125
val connectionPanel = panel {
125
126
indent {
126
127
row {
@@ -144,9 +145,9 @@ class GitpodConnectionProvider : GatewayConnectionProvider {
144
145
}
145
146
panel {
146
147
row {
147
-
link(connectParams.workspaceId) {
148
-
if (ideUrl.isNotBlank()) {
149
-
BrowserUtil.browse(ideUrl)
148
+
link(connectParams.resolvedWorkspaceId) {
149
+
if (resolvedIdeUrl.isNotBlank()) {
150
+
BrowserUtil.browse(resolvedIdeUrl)
150
151
}
151
152
}
152
153
}
@@ -183,7 +184,7 @@ class GitpodConnectionProvider : GatewayConnectionProvider {
183
184
if (WorkspaceInstance.isUpToDate(lastUpdate, update)) {
0 commit comments