Skip to content

Commit

Permalink
fix(intellij): remove broken API usage (removed in IJ 2023.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwouts committed Dec 15, 2023
1 parent 827769f commit fa753c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integrations/intellij/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pluginVersion = 1.27.2
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 231
pluginUntilBuild = 232
pluginUntilBuild = 233.*

# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.previewjs.intellij.plugin.services

import com.intellij.codeInsight.hints.InlayHintsPassFactory
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
import com.intellij.execution.filters.TextConsoleBuilderFactory
import com.intellij.execution.ui.ConsoleView
import com.intellij.execution.ui.ConsoleViewContentType
Expand Down Expand Up @@ -215,9 +215,13 @@ class ProjectService(private val project: Project) : Disposable {
private fun recrawlFile(file: VirtualFile, text: String) {
crawlFile(file) { components ->
componentMap[file.path] = Pair(text, components)
@Suppress("UnstableApiUsage")
app.invokeLater {
InlayHintsPassFactory.forceHintsUpdateOnNextPass()
// This is very inefficient but there is no better way since
// InlayHintsPassFactory was moved to an internal package in
// IJ 2023.3.
//
// See https://youtrack.jetbrains.com/issue/IDEA-333164
DaemonCodeAnalyzer.getInstance(project).restart()
}
}
}
Expand Down

0 comments on commit fa753c7

Please sign in to comment.