Skip to content

Commit

Permalink
Update Platform Version of JetBrains Backend Plugin to 223.7126-EAP-C…
Browse files Browse the repository at this point in the history
…ANDIDATE-SNAPSHOT

Co-authored-by: Andrea Falzetti <[email protected]>
  • Loading branch information
felladrin and Andrea Falzetti committed Oct 19, 2022
1 parent 6fde72b commit 9144948
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=223
pluginSinceBuild=223.7126
pluginUntilBuild=223.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions.
pluginVerifierIdeVersions=2022.3
# Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots
platformVersion=223.6160-EAP-CANDIDATE-SNAPSHOT
platformVersion=223.7126-EAP-CANDIDATE-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ TEST_BACKEND_DIR="/workspace/ide-backend-$JB_QUALIFIER"
if [ ! -d "$TEST_BACKEND_DIR" ]; then
mkdir -p $TEST_BACKEND_DIR
if [[ $RUN_FROM == "snapshot" ]]; then
SNAPSHOT_VERSION=$(grep "platformVersion=" "gradle-$JB_QUALIFIER.properties" | sed 's/platformVersion=//')
(cd $TEST_BACKEND_DIR &&
SNAPSHOT_VERSION=$(grep "platformVersion=" "gradle-$JB_QUALIFIER.properties" | sed 's/platformVersion=//') &&
echo "Downloading the $JB_QUALIFIER version of IntelliJ IDEA ($SNAPSHOT_VERSION)..." &&
curl -sSLo backend.zip "https://www.jetbrains.com/intellij-repository/snapshots/com/jetbrains/intellij/idea/ideaIU/$SNAPSHOT_VERSION/ideaIU-$SNAPSHOT_VERSION.zip" &&
unzip backend.zip &&
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
// Licensed under the GNU Affero General Public License (AGPL).
// See License-AGPL.txt in the project root for license information.

package io.gitpod.jetbrains.remote

import java.nio.file.Path

interface GitpodCLIHelper {
suspend fun open(file: Path, shouldWait: Boolean)
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class GitpodCLIService : RestService() {

private val manager = service<GitpodManager>()
private val portsService = service<GitpodPortsService>()
private val cliHelperService = service<GitpodCLIHelper>()

override fun getServiceName() = SERVICE_NAME

Expand Down Expand Up @@ -71,7 +72,7 @@ class GitpodCLIService : RestService() {
return withClient(request, context) {
GlobalScope.launch {
withContext(Dispatchers.IO) {
CommandLineProcessor.doOpenFileOrProject(file, shouldWait).future.get()
cliHelperService.open(file, shouldWait)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
// Licensed under the GNU Affero General Public License (AGPL).
// See License-AGPL.txt in the project root for license information.

package io.gitpod.jetbrains.remote.latest

import com.intellij.ide.CommandLineProcessor
import io.gitpod.jetbrains.remote.GitpodCLIHelper
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import java.nio.file.Path
import kotlinx.coroutines.withContext
import kotlinx.coroutines.Dispatchers

@Suppress("UnstableApiUsage", "OPT_IN_USAGE")
class GitpodCLIHelperImpl : GitpodCLIHelper {
override suspend fun open(file :Path, shouldWait: Boolean) {
CommandLineProcessor.doOpenFileOrProject(file, shouldWait).future.await()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ class GitpodPortForwardingService(private val session: ClientProjectSession) {
hostPort,
PortType.TCP,
setOf(FORWARDED_PORT_LABEL),
hostPort,
ClientPortPickingStrategy.REASSIGN_WHEN_BUSY
ClientPortAttributes(hostPort, ClientPortPickingStrategy.REASSIGN_WHEN_BUSY),
) {
this.name = port.name
this.description = port.description
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
// Licensed under the GNU Affero General Public License (AGPL).
// See License-AGPL.txt in the project root for license information.

package io.gitpod.jetbrains.remote.stable

import com.intellij.ide.CommandLineProcessor
import io.gitpod.jetbrains.remote.GitpodCLIHelper
import java.nio.file.Path

@Suppress("UnstableApiUsage", "OPT_IN_USAGE")
class GitpodCLIHelperImpl : GitpodCLIHelper {
override suspend fun open(file :Path, shouldWait: Boolean) {
CommandLineProcessor.doOpenFileOrProject(file, shouldWait).future.get()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<extensions defaultExtensionNs="com.intellij">
<applicationService serviceInterface="io.gitpod.jetbrains.remote.GitpodIgnoredPortsForNotificationService" serviceImplementation="io.gitpod.jetbrains.remote.latest.GitpodIgnoredPortsForNotificationServiceImpl" preload="true"/>
<projectService serviceImplementation="io.gitpod.jetbrains.remote.latest.GitpodPortForwardingService" preload="true" client="guest"/>
<applicationService serviceInterface="io.gitpod.jetbrains.remote.GitpodCLIHelper" serviceImplementation="io.gitpod.jetbrains.remote.latest.GitpodCLIHelperImpl" />
</extensions>
</idea-plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
<idea-plugin>
<extensions defaultExtensionNs="com.intellij">
<applicationService serviceInterface="io.gitpod.jetbrains.remote.GitpodIgnoredPortsForNotificationService" serviceImplementation="io.gitpod.jetbrains.remote.stable.GitpodIgnoredPortsForNotificationServiceImpl" preload="true"/>
<applicationService serviceInterface="io.gitpod.jetbrains.remote.GitpodCLIHelper" serviceImplementation="io.gitpod.jetbrains.remote.stable.GitpodCLIHelperImpl" />
</extensions>
</idea-plugin>

0 comments on commit 9144948

Please sign in to comment.