Skip to content

Commit 9724ec7

Browse files
committed
backwards compatibility issues
(cherry picked from commit e9337ca)
1 parent 573969f commit 9724ec7

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ kotlin.stdlib.default.dependency = true
2424
apolloVersion=3.0.0
2525
vertxVersion=4.2.4
2626
slf4jVersion=1.7.33
27-
jacksonVersion=2.12.5
27+
jacksonVersion=2.13.1
28+
joorVersion=0.9.13

marker/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ val kotlinVersion = ext.get("kotlinVersion")
77
val pluginGroup: String by project
88
val projectVersion: String by project
99
val slf4jVersion: String by project
10+
val joorVersion: String by project
1011

1112
publishing {
1213
publications {
@@ -28,6 +29,7 @@ repositories {
2829
dependencies {
2930
val intellijVersion = "213.6777.52"
3031

32+
compileOnly("org.jooq:joor:$joorVersion")
3133
compileOnly("com.github.sourceplusplus.protocol:protocol:$projectVersion")
3234
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinVersion")
3335
compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/component/jcef/SourceMarkJcefComponent.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import com.intellij.ui.jcef.JBCefClient
2525
import kotlinx.coroutines.GlobalScope
2626
import kotlinx.coroutines.delay
2727
import kotlinx.coroutines.launch
28+
import org.joor.Reflect
29+
import org.joor.ReflectException
2830
import spp.jetbrains.marker.source.mark.api.component.api.SourceMarkComponent
2931
import spp.jetbrains.marker.source.mark.api.component.jcef.config.SourceMarkJcefComponentConfiguration
3032
import java.awt.Dimension
@@ -68,9 +70,12 @@ class SourceMarkJcefComponent(
6870

6971
//periodically update zoom level
7072
GlobalScope.launch {
71-
while(browser != null) {
73+
while (browser != null) {
7274
delay(50)
73-
browser?.zoomLevel = configuration.zoomLevel
75+
try {
76+
browser?.let { Reflect.on(it).call("setZoomLevel", configuration.zoomLevel) }
77+
} catch (ignore: ReflectException) {
78+
}
7479
}
7580
}
7681

plugin/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
## [Unreleased]
66
### Added
7+
- Ability to configure plugin via `.spp/spp-plugin.yml` file
78

89
### Changed
910

@@ -12,6 +13,7 @@
1213
### Removed
1314

1415
### Fixed
16+
- Backwards compatibility issues
1517

1618
### Security
1719

plugin/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ plugins {
88
id("maven-publish")
99
}
1010

11+
val joorVersion: String by project
1112
val jacksonVersion: String by project
1213
val vertxVersion: String by project
1314
val kotlinVersion = ext.get("kotlinVersion")
@@ -66,6 +67,7 @@ dependencies {
6667
implementation("com.github.sourceplusplus.protocol:protocol:$projectVersion")
6768
}
6869

70+
implementation("org.jooq:joor:$joorVersion")
6971
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion")
7072
implementation("org.apache.commons:commons-text:1.9")
7173
implementation("com.github.sh5i:git-stein:v0.5.0")
@@ -74,7 +76,6 @@ dependencies {
7476
implementation("io.vertx:vertx-lang-kotlin:$vertxVersion")
7577
implementation("io.vertx:vertx-lang-kotlin-coroutines:$vertxVersion")
7678
implementation("io.vertx:vertx-web:$vertxVersion")
77-
//implementation("io.vertx:vertx-service-discovery:$vertxVersion")
7879
implementation(files(".ext/vertx-service-discovery-4.0.3-SNAPSHOT.jar"))
7980
implementation("io.vertx:vertx-service-proxy:$vertxVersion")
8081
implementation("io.vertx:vertx-tcp-eventbus-bridge:$vertxVersion")

plugin/src/main/kotlin/spp/jetbrains/sourcemarker/SourceMarkerPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ object SourceMarkerPlugin {
168168
DatabindCodec.mapper().registerModule(GuavaModule())
169169
DatabindCodec.mapper().registerModule(Jdk8Module())
170170
DatabindCodec.mapper().registerModule(JavaTimeModule())
171-
DatabindCodec.mapper().registerModule(KotlinModule())
171+
DatabindCodec.mapper().registerModule(KotlinModule.Builder().build())
172172
DatabindCodec.mapper().enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)
173173
DatabindCodec.mapper().enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING)
174174

0 commit comments

Comments
 (0)