-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for JetBrains EAP IDEs (2022.3) #13400
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
components/ide/jetbrains/backend-plugin/gradle-latest.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=222 | ||
pluginUntilBuild=222.* | ||
pluginSinceBuild=223 | ||
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.2 | ||
pluginVerifierIdeVersions=2022.3 | ||
# Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots | ||
platformVersion=222.4167-EAP-CANDIDATE-SNAPSHOT | ||
platformVersion=223.4884-EAP-CANDIDATE-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...in/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodIgnoredPortsForNotificationService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
interface GitpodIgnoredPortsForNotificationService { | ||
fun ignorePort(portNumber: Int) | ||
/** Get ports that aren't actually used by the user (e.g. ports used internally by JetBrains IDEs) */ | ||
fun getIgnoredPorts(): Set<Int> | ||
} |
31 changes: 31 additions & 0 deletions
31
.../kotlin/io/gitpod/jetbrains/remote/latest/GitpodIgnoredPortsForNotificationServiceImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// 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.idea.getServerFutureAsync | ||
import io.gitpod.jetbrains.remote.GitpodIgnoredPortsForNotificationService | ||
import kotlinx.coroutines.GlobalScope | ||
import kotlinx.coroutines.launch | ||
import org.jetbrains.ide.BuiltInServerManager | ||
|
||
@Suppress("OPT_IN_USAGE") | ||
class GitpodIgnoredPortsForNotificationServiceImpl : GitpodIgnoredPortsForNotificationService { | ||
private val ignoredPortsForNotification = mutableSetOf(5990) | ||
|
||
init { | ||
GlobalScope.launch { | ||
BuiltInServerManager.getInstance().waitForStart().port.let { ignorePort(it) } | ||
getServerFutureAsync().await()?.port?.let { ignorePort(it) } | ||
} | ||
} | ||
|
||
override fun ignorePort(portNumber: Int) { | ||
ignoredPortsForNotification.add(portNumber) | ||
} | ||
|
||
override fun getIgnoredPorts(): Set<Int> { | ||
return ignoredPortsForNotification.toSet() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
.../kotlin/io/gitpod/jetbrains/remote/stable/GitpodIgnoredPortsForNotificationServiceImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// 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.idea.StartupUtil | ||
import io.gitpod.jetbrains.remote.GitpodIgnoredPortsForNotificationService | ||
import kotlinx.coroutines.GlobalScope | ||
import kotlinx.coroutines.launch | ||
import kotlinx.coroutines.future.await | ||
import org.jetbrains.ide.BuiltInServerManager | ||
|
||
@Suppress("OPT_IN_USAGE") | ||
class GitpodIgnoredPortsForNotificationServiceImpl : GitpodIgnoredPortsForNotificationService { | ||
private val ignoredPortsForNotification = mutableSetOf(5990) | ||
|
||
init { | ||
GlobalScope.launch { | ||
BuiltInServerManager.getInstance().waitForStart().port.let { ignorePort(it) } | ||
StartupUtil.getServerFuture().await().port?.let { ignorePort(it) } | ||
} | ||
} | ||
|
||
override fun ignorePort(portNumber: Int) { | ||
ignoredPortsForNotification.add(portNumber) | ||
} | ||
|
||
override fun getIgnoredPorts(): Set<Int> { | ||
return ignoredPortsForNotification.toSet() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ignore ports functionality seems to be overcomplicated now, instead of being 3 lines of code, we have 3 files. Am I missing any benefit from doing so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need one version for 2022.2 API [1] and another for 2022.3 [1].
Or we can remove the ignored ports part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see - thanks!