Skip to content

Commit 34a44c7

Browse files
authored
Support rider 2022.2 (#128)
* support rider 2022.2 Signed-off-by: shalom <[email protected]> * upgrade to rider 2022.2 Signed-off-by: shalom <[email protected]> * upgrade to rider 2022.2 Signed-off-by: shalom <[email protected]> * upgrade to rider 2022.2 Signed-off-by: shalom <[email protected]>
1 parent 5e4daa5 commit 34a44c7

File tree

12 files changed

+29
-34
lines changed

12 files changed

+29
-34
lines changed

build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,16 @@ tasks {
157157
// Rider's backend doesn't support dynamic plugins. It might be possible to work with auto-reload of the frontend
158158
// part of a plugin, but there are dangers about keeping plugins in sync
159159
autoReloadPlugins.set(false)
160+
//workaround, it's a Gradle IntelliJ Plugin issue
161+
jvmArgs = listOf("--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED")
160162
}
161163

162164

163165
listProductsReleases {
164166
// types.set(listOf("RD","IC","PC","IU"))
165167
types.set(listOf("RD"))
166168
sinceVersion.set("2022.1")
167-
untilVersion.set("2022.1.2")
169+
untilVersion.set("2022.2")
168170
// sinceBuild.set("221.5787.35")
169171
// untilBuild.set("221.5591.21")
170172
}
@@ -203,7 +205,7 @@ tasks {
203205

204206
create("printVersion", DefaultTask::class.java) {
205207
doLast {
206-
println("The project current version is ${project.semanticVersion.version.get()}")
208+
logger.lifecycle("The project current version is ${project.semanticVersion.version.get()}")
207209
}
208210
}
209211

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ repositories {
1212

1313
dependencies {
1414
//Note: gradle-intellij-plugin 1.5.3 has some bugs with runIde that does not detect changes in kotlin UI DSL
15-
implementation("org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.5.2")
16-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
15+
implementation("org.jetbrains.intellij.plugins:gradle-intellij-plugin:1.7.0")
16+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
1717
implementation("com.dorongold.plugins:task-tree:2.1.0")
1818
implementation("com.glovoapp.semantic-versioning:com.glovoapp.semantic-versioning.gradle.plugin:1.1.10")
1919
}

gradle.properties

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
##Note: after changes in this file a clean build is necessary: gradlew clean build
2-
32
# IntelliJ Platform Artifacts Repositories
43
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
5-
6-
pluginGroup = org.digma.plugins
7-
pluginName = digma-intellij
4+
pluginGroup=org.digma.plugins
5+
pluginName=digma-intellij
86
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
97
# for insight into build numbers and IntelliJ Platform versions.
108
# See https://www.jetbrains.com/intellij-repository/releases/
11-
pluginSinceBuild = 221
12-
pluginUntilBuild = 221.*
13-
9+
pluginSinceBuild=222
10+
pluginUntilBuild=222.*
1411
# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
1512
## supported IDEs : IC,IU,PC,PY,RD,CI
1613
## default is rider
17-
platformType = RD
18-
platformVersion = 2022.1.1
19-
14+
platformType=RD
15+
platformVersion=2022.2
2016
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
2117
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:213.7172.25
2218
# to load IC with python support:

ide-common/src/main/java/org/digma/intellij/plugin/analytics/AnalyticsService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public Environment getEnvironment() {
8080
}
8181

8282
//just replace the client and do not fire any events
83+
//this method should be synchronized, and it shouldn't be a problem that really doesn't happen too often.
8384
private synchronized void replaceClient(String url, String token) {
8485
if (analyticsProviderProxy != null) {
8586
try {

rider/Digma.Rider.Plugin/Plugin.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<SdkVersion>2022.1.1</SdkVersion>
4+
<SdkVersion>2022.2.0</SdkVersion>
55

66
<Title>DigmaRiderPlugin</Title>
77
<Description>Digma Rider Plugin</Description>

rider/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
99
plugins {
1010
id("plugin-library")
1111
id("common-kotlin")
12-
id("com.jetbrains.rdgen") version libs.versions.intellij.platform.get()
12+
id("com.jetbrains.rdgen") version libs.versions.rider.rdgen.get()
1313
}
1414

1515

@@ -117,7 +117,7 @@ tasks {
117117

118118
//the file rider.kotlin_module is generated by kotlin and as i noticed in rider plugin template it is
119119
//packaged into the plugin. couldn't understand if this file is necessary or not and even jetbrains guys
120-
//couldn't tell what it is. its in every rider plugin i saw, so copy this file to our main plugin whatever it is.
120+
//couldn't tell what it is. it's in every rider plugin i saw, so copy this file to our main plugin whatever it is.
121121
create("copyKotlinModuleFile",Copy::class.java){
122122
dependsOn(classes)
123123
from(project.layout.buildDirectory.dir("classes/kotlin/main/META-INF").get().file("rider.kotlin_module"))

rider/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
DotnetPluginId=Digma.Rider.Plugin
55
DotnetSolution=Digma.Rider.Plugin.sln
6-
RiderPluginId=org.rider.plugins.sampleriderplugin
6+
RiderPluginId=org.digma.rider.plugins
77
BuildConfiguration=Debug
88

99

rider/src/main/kotlin/org/digma/intellij/plugin/rider/ServicesStarter.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.digma.intellij.plugin.rider
22

3+
import com.intellij.openapi.project.DumbAware
34
import com.intellij.openapi.project.Project
45
import com.intellij.openapi.startup.StartupActivity
56
import org.digma.intellij.plugin.document.DocumentAnalyzer
@@ -10,7 +11,7 @@ import org.digma.intellij.plugin.rider.protocol.ShowToolWindowHost
1011
import java.util.*
1112

1213
//todo : delete
13-
class ServicesStarter : StartupActivity {
14+
class ServicesStarter : StartupActivity, DumbAware {
1415

1516
//with rider some services need to start when the project starts.
1617
//StartupActivity is a good option. but if the tool window is re-opened on startup

rider/src/main/kotlin/org/digma/intellij/plugin/rider/protocol/DocumentCodeObjectsListener.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,8 @@ class DocumentCodeObjectsListener(project: Project) : LifetimedProjectComponent(
2222
Log.log(logger::info, "DocumentCodeObjectsListener registering for solution startup..")
2323

2424

25-
//todo: remove
26-
project.solution.isLoaded.advise(project.lifetime) {
27-
Log.log(logger::info, "in isLoaded")
28-
}
2925

30-
project.solution.solutionLifecycle.fullStartupFinished.advise(project.lifetime) {
26+
project.solution.isLoaded.advise(project.lifetime) {
3127

3228
Log.log(logger::info, "Starting DocumentCodeObjectsListener")
3329

rider/src/main/kotlin/org/digma/intellij/plugin/rider/protocol/ElementUnderCaretDetector.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ class ElementUnderCaretDetector(project: Project) : LifetimedProjectComponent(pr
2525

2626
Log.log(logger::info,project, "ElementUnderCaretDetector registering for solution startup..")
2727

28-
//todo: remove
29-
project.solution.isLoaded.advise(project.lifetime) {
30-
Log.log(logger::info,"in isLoaded")
31-
}
3228

33-
project.solution.solutionLifecycle.fullStartupFinished.advise(project.lifetime) {
29+
project.solution.isLoaded.advise(project.lifetime) {
3430
Log.log(logger::info, "Starting ElementUnderCaretDetector")
3531

3632
//maybe there is already a MethodUnderCaretEvent in the protocol. the backend may fire events

0 commit comments

Comments
 (0)