Skip to content

Commit 2168d6a

Browse files
authored
Merge pull request #54 from AVSystem/idea25-support
Support IDEA 2025.1 EAP
2 parents b1ac43c + f169797 commit 2168d6a

File tree

6 files changed

+22
-19
lines changed

6 files changed

+22
-19
lines changed

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
os: [ubuntu-latest]
25-
scala: [2.13.14]
25+
scala: [2.13.16]
2626
java: [temurin@17]
2727
runs-on: ${{ matrix.os }}
2828
steps:
@@ -64,7 +64,7 @@ jobs:
6464
strategy:
6565
matrix:
6666
os: [ubuntu-latest]
67-
scala: [2.13.14]
67+
scala: [2.13.16]
6868
java: [temurin@17]
6969
runs-on: ${{ matrix.os }}
7070
steps:
@@ -84,12 +84,12 @@ jobs:
8484
- name: Setup sbt
8585
uses: sbt/setup-sbt@v1
8686

87-
- name: Download target directories (2.13.14)
87+
- name: Download target directories (2.13.16)
8888
uses: actions/download-artifact@v4
8989
with:
90-
name: target-${{ matrix.os }}-2.13.14-${{ matrix.java }}
90+
name: target-${{ matrix.os }}-2.13.16-${{ matrix.java }}
9191

92-
- name: Inflate target directories (2.13.14)
92+
- name: Inflate target directories (2.13.16)
9393
run: |
9494
tar xf targets.tar
9595
rm targets.tar

build.sbt

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import org.jetbrains.sbtidea.Keys._
22

3-
ThisBuild / scalaVersion := "2.13.14"
3+
ThisBuild / scalaVersion := "2.13.16"
44
ThisBuild / intellijPluginName := "intellij-hocon"
5-
ThisBuild / intellijBuild := "242.20224.300"
5+
ThisBuild / intellijBuild := "251.17181.31"
66
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
77

88
val junitInterfaceVersion = "0.11"
9-
val commonsTextVersion = "1.12.0"
9+
val junitVersion = "4.13.2"
10+
val commonsTextVersion = "1.13.0"
1011
val opentest4jVersion = "1.3.0"
1112

1213
lazy val hocon = project.in(file(".")).enablePlugins(SbtIdeaPlugin).settings(
13-
version := "2024.2.99-SNAPSHOT",
14+
version := "2025.1.99-SNAPSHOT",
1415
Compile / scalaSource := baseDirectory.value / "src",
1516
Test / scalaSource := baseDirectory.value / "test",
1617
Compile / resourceDirectory := baseDirectory.value / "resources",
@@ -22,10 +23,11 @@ lazy val hocon = project.in(file(".")).enablePlugins(SbtIdeaPlugin).settings(
2223
"-Xfatal-warnings",
2324
),
2425
ideBasePackages := Seq("org.jetbrains.plugins.hocon"),
25-
intellijPlugins := Seq("com.intellij.properties", "com.intellij.java", "com.intellij.java-i18n").map(_.toPlugin),
26+
intellijPlugins := Seq("com.intellij.java", "com.intellij.java-i18n", "com.intellij.modules.json").map(_.toPlugin),
2627
libraryDependencies ++= Seq(
2728
"org.apache.commons" % "commons-text" % commonsTextVersion,
2829
"com.novocode" % "junit-interface" % junitInterfaceVersion % Test,
30+
"junit" % "junit" % junitVersion % Test,
2931
"org.opentest4j" % "opentest4j" % opentest4jVersion % Test,
3032
),
3133
packageLibraryMappings := Seq.empty, // allow scala-library

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# suppress inspection "UnusedProperty" for whole file
2-
sbt.version=1.10.1
2+
sbt.version=1.10.7

project/plugins.sbt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "3.26.2")
2-
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")
1+
addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "4.0.3")
2+
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.2")
33
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")

resources/META-INF/plugin.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
<id>org.jetbrains.plugins.hocon</id>
44
<name>HOCON</name>
55
<description>Standalone HOCON plugin for IntelliJ IDEA</description>
6-
<version>2024.2.99-SNAPSHOT</version>
6+
<version>2025.1.99-SNAPSHOT</version>
77
<vendor>Roman Janusz, AVSystem, JetBrains</vendor>
8-
<idea-version since-build="242.0" until-build="250.0"/>
8+
<idea-version since-build="251.0" until-build="260.0"/>
99
<depends>com.intellij.modules.platform</depends>
1010
<depends>com.intellij.modules.lang</depends>
11+
<depends>com.intellij.modules.json</depends>
1112
<depends optional="true" config-file="hocon-java.xml">com.intellij.modules.java</depends>
1213

1314
<change-notes>

test/org/jetbrains/plugins/hocon/HoconActionTest.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ object HoconActionTest {
5555

5656
private def mockDataContext(file: PsiFile, editor: Editor) = {
5757
val parentContext = DataManager.getInstance().getDataContext(editor.getComponent)
58-
CustomizedDataContext.withProvider(parentContext, (dataId: String) => {
59-
if (CommonDataKeys.PROJECT is dataId) file.getProject
60-
else if (CommonDataKeys.EDITOR is dataId) editor
61-
else null
58+
CustomizedDataContext.withSnapshot(parentContext, (sink: DataSink) => {
59+
sink.set(CommonDataKeys.PROJECT, file.getProject)
60+
sink.set(CommonDataKeys.EDITOR, editor)
61+
sink.set(CommonDataKeys.PSI_FILE, file)
6262
})
6363
}
6464

0 commit comments

Comments
 (0)