Skip to content

Commit

Permalink
Support for IDEA 2025.1 EAP
Browse files Browse the repository at this point in the history
  • Loading branch information
ddworak committed Jan 25, 2025
1 parent ec31c96 commit f169797
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 5 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import org.jetbrains.sbtidea.Keys._

ThisBuild / scalaVersion := "2.13.16"
ThisBuild / intellijPluginName := "intellij-hocon"
ThisBuild / intellijBuild := "242.20224.300"
ThisBuild / intellijBuild := "251.17181.31"
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))

val junitInterfaceVersion = "0.11"
val junitVersion = "4.13.2"
val commonsTextVersion = "1.13.0"
val opentest4jVersion = "1.3.0"

lazy val hocon = project.in(file(".")).enablePlugins(SbtIdeaPlugin).settings(
version := "2024.2.99-SNAPSHOT",
version := "2025.1.99-SNAPSHOT",
Compile / scalaSource := baseDirectory.value / "src",
Test / scalaSource := baseDirectory.value / "test",
Compile / resourceDirectory := baseDirectory.value / "resources",
Expand All @@ -22,10 +23,11 @@ lazy val hocon = project.in(file(".")).enablePlugins(SbtIdeaPlugin).settings(
"-Xfatal-warnings",
),
ideBasePackages := Seq("org.jetbrains.plugins.hocon"),
intellijPlugins := Seq("com.intellij.properties", "com.intellij.java", "com.intellij.java-i18n").map(_.toPlugin),
intellijPlugins := Seq("com.intellij.java", "com.intellij.java-i18n", "com.intellij.modules.json").map(_.toPlugin),
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-text" % commonsTextVersion,
"com.novocode" % "junit-interface" % junitInterfaceVersion % Test,
"junit" % "junit" % junitVersion % Test,
"org.opentest4j" % "opentest4j" % opentest4jVersion % Test,
),
packageLibraryMappings := Seq.empty, // allow scala-library
Expand Down
5 changes: 3 additions & 2 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<id>org.jetbrains.plugins.hocon</id>
<name>HOCON</name>
<description>Standalone HOCON plugin for IntelliJ IDEA</description>
<version>2024.2.99-SNAPSHOT</version>
<version>2025.1.99-SNAPSHOT</version>
<vendor>Roman Janusz, AVSystem, JetBrains</vendor>
<idea-version since-build="242.0" until-build="250.0"/>
<idea-version since-build="251.0" until-build="260.0"/>
<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.lang</depends>
<depends>com.intellij.modules.json</depends>
<depends optional="true" config-file="hocon-java.xml">com.intellij.modules.java</depends>

<change-notes>
Expand Down
8 changes: 4 additions & 4 deletions test/org/jetbrains/plugins/hocon/HoconActionTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ object HoconActionTest {

private def mockDataContext(file: PsiFile, editor: Editor) = {
val parentContext = DataManager.getInstance().getDataContext(editor.getComponent)
CustomizedDataContext.withProvider(parentContext, (dataId: String) => {
if (CommonDataKeys.PROJECT is dataId) file.getProject
else if (CommonDataKeys.EDITOR is dataId) editor
else null
CustomizedDataContext.withSnapshot(parentContext, (sink: DataSink) => {
sink.set(CommonDataKeys.PROJECT, file.getProject)
sink.set(CommonDataKeys.EDITOR, editor)
sink.set(CommonDataKeys.PSI_FILE, file)
})
}

Expand Down

0 comments on commit f169797

Please sign in to comment.