Skip to content

Commit ec5a827

Browse files
committed
Make it build
1 parent e32db4f commit ec5a827

File tree

6 files changed

+38
-6
lines changed

6 files changed

+38
-6
lines changed

components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodClientProjectSessionTracker.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import com.intellij.ide.BrowserUtil
99
import com.intellij.notification.NotificationAction
1010
import com.intellij.notification.NotificationType
1111
import com.intellij.openapi.Disposable
12-
import com.intellij.openapi.client.ClientSessionsManager
12+
import com.intellij.openapi.client.ClientProjectSession
1313
import com.intellij.openapi.components.service
1414
import com.intellij.openapi.components.serviceOrNull
1515
import com.intellij.openapi.diagnostic.thisLogger
@@ -35,10 +35,10 @@ import java.util.concurrent.CancellationException
3535
import java.util.concurrent.CompletableFuture
3636

3737
@Suppress("UnstableApiUsage", "OPT_IN_USAGE")
38-
class GitpodClientProjectSessionTracker(private val project: Project) : Disposable {
38+
abstract class AbstractGitpodClientProjectSessionTracker(private val project: Project) : Disposable {
3939

4040
private val manager = service<GitpodManager>()
41-
private val session = ClientSessionsManager.getProjectSession(project)
41+
abstract val session: ClientProjectSession?
4242

4343
private lateinit var info: Info.WorkspaceInfoResponse
4444
private val lifetime = Lifetime.Eternal.createNested()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2+
// Licensed under the GNU Affero General Public License (AGPL).
3+
// See License.AGPL.txt in the project root for license information.
4+
5+
package io.gitpod.jetbrains.remote.latest
6+
7+
import com.intellij.codeWithMe.ClientId
8+
import com.intellij.openapi.client.ClientProjectSession
9+
import com.intellij.openapi.client.ClientSessionsManager
10+
import com.intellij.openapi.project.Project
11+
import io.gitpod.jetbrains.remote.AbstractGitpodClientProjectSessionTracker
12+
13+
@Suppress("UnstableApiUsage")
14+
class GitpodClientProjectSessionTracker(val project: Project) : AbstractGitpodClientProjectSessionTracker(project) {
15+
override val session: ClientProjectSession? = ClientSessionsManager.getProjectSession(project, ClientId.current)
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2+
// Licensed under the GNU Affero General Public License (AGPL).
3+
// See License.AGPL.txt in the project root for license information.
4+
5+
package io.gitpod.jetbrains.remote.stable
6+
7+
import com.intellij.openapi.client.ClientProjectSession
8+
import com.intellij.openapi.client.ClientSessionsManager
9+
import com.intellij.openapi.project.Project
10+
import io.gitpod.jetbrains.remote.AbstractGitpodClientProjectSessionTracker
11+
12+
@Suppress("UnstableApiUsage")
13+
class GitpodClientProjectSessionTracker(val project: Project) : AbstractGitpodClientProjectSessionTracker(project) {
14+
override val session: ClientProjectSession? = ClientSessionsManager.getProjectSession(project)
15+
}

components/ide/jetbrains/backend-plugin/src/main/resources-latest/META-INF/extensions.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
<!--suppress PluginXmlValidity -->
77
<idea-plugin>
88
<extensions defaultExtensionNs="com.intellij">
9+
<projectService serviceImplementation="io.gitpod.jetbrains.remote.latest.GitpodClientProjectSessionTracker"
10+
client="controller" preload="true"/>
911
</extensions>
1012
</idea-plugin>

components/ide/jetbrains/backend-plugin/src/main/resources-stable/META-INF/extensions.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
<!--suppress PluginXmlValidity -->
77
<idea-plugin>
88
<extensions defaultExtensionNs="com.intellij">
9+
<projectService serviceImplementation="io.gitpod.jetbrains.remote.stable.GitpodClientProjectSessionTracker"
10+
client="controller" preload="true"/>
911
</extensions>
1012
</idea-plugin>

components/ide/jetbrains/backend-plugin/src/main/resources/META-INF/plugin.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838

3939
<httpRequestHandler implementation="io.gitpod.jetbrains.remote.GitpodCLIService"/>
4040

41-
<projectService serviceImplementation="io.gitpod.jetbrains.remote.GitpodClientProjectSessionTracker"
42-
client="controller" preload="true"/>
43-
4441
<gateway.customization.name
4542
implementation="io.gitpod.jetbrains.remote.GitpodGatewayClientCustomizationProvider"/>
4643
<gateway.customization.metrics id="gitpodMetricsProvider"

0 commit comments

Comments
 (0)