Skip to content

Commit

Permalink
Merge pull request AVSystem#44 from AVSystem/update
Browse files Browse the repository at this point in the history
Update IntelliJ version, initial support for 2024.1
  • Loading branch information
ddworak authored Jan 30, 2024
2 parents 27a81ad + c8bbafc commit 5379f77
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import org.jetbrains.sbtidea.Keys._

ThisBuild / scalaVersion := "2.13.10"
ThisBuild / intellijPluginName := "intellij-hocon"
ThisBuild / intellijBuild := "231.8109.2"
ThisBuild / intellijBuild := "241.8102.112"
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))

val junitInterfaceVersion = "0.11"

lazy val hocon = project.in(file(".")).enablePlugins(SbtIdeaPlugin).settings(
version := "2023.1.99-SNAPSHOT",
version := "2024.1.99-SNAPSHOT",
Compile / scalaSource := baseDirectory.value / "src",
Test / scalaSource := baseDirectory.value / "test",
Compile / resourceDirectory := baseDirectory.value / "resources",
Expand Down
4 changes: 2 additions & 2 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<id>org.jetbrains.plugins.hocon</id>
<name>HOCON</name>
<description>Standalone HOCON plugin for IntelliJ IDEA</description>
<version>2023.1.99-SNAPSHOT</version>
<version>2024.1.99-SNAPSHOT</version>
<vendor>Roman Janusz, AVSystem, JetBrains</vendor>
<idea-version since-build="231.0" until-build="240.0"/>
<idea-version since-build="241.0" until-build="250.0"/>
<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.lang</depends>
<depends optional="true" config-file="hocon-java.xml">com.intellij.modules.java</depends>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package misc

import com.intellij.lang.documentation.{DocumentationMarkup, DocumentationProviderEx}
import com.intellij.psi.{PsiElement, PsiManager}
import org.apache.commons.lang.StringEscapeUtils
import org.apache.commons.text.StringEscapeUtils
import org.jetbrains.plugins.hocon.psi._
import org.jetbrains.plugins.hocon.semantics.{ResOpts, ResolvedField}

Expand Down Expand Up @@ -51,7 +51,7 @@ class HoconDocumentationProvider extends DocumentationProviderEx {
val content =
if (docComments.isEmpty) ""
else docComments
.map(c => StringEscapeUtils.escapeHtml(c.getText.stripPrefix("#")))
.map(c => StringEscapeUtils.escapeHtml4(c.getText.stripPrefix("#")))
.mkString(CONTENT_START, "<br/>", CONTENT_END)
definition + content
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ class HoconGotoSymbolContributor extends ChooseByNameContributorEx {
}

case class HoconGotoSymbolItem(key: HKey) extends PsiElementNavigationItem with ItemPresentation {
def getTargetElement: PsiElement = key
def getName: String = key.getText
def navigate(requestFocus: Boolean): Unit = key.navigate(requestFocus)
def canNavigate: Boolean = key.canNavigate
def canNavigateToSource: Boolean = key.canNavigateToSource
def getPresentation: ItemPresentation = this
def getPresentableText: String = key.fullPathText.orNull
def getIcon(unused: Boolean): Icon = PropertyIcon
override def getTargetElement: PsiElement = key
override def getName: String = key.getText
override def navigate(requestFocus: Boolean): Unit = key.navigate(requestFocus)
override def canNavigate: Boolean = key.canNavigate
override def canNavigateToSource: Boolean = key.canNavigateToSource
override def getPresentation: ItemPresentation = this
override def getPresentableText: String = key.fullPathText.orNull
override def getIcon(unused: Boolean): Icon = PropertyIcon

override def getLocationString: String =
key.hoconFile.getVirtualFile.opt.map { vf =>
Expand Down

0 comments on commit 5379f77

Please sign in to comment.