Skip to content

Commit

Permalink
Fix compatibility issues with latest EAP
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNesto committed Oct 14, 2023
1 parent 3b9a30b commit ec2b1f3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
# suppress inspection "UnusedProperty" for whole file
kotlin.code.style=official

ideaVersion = 233-EAP-SNAPSHOT
ideaVersion = 233.9802.14-EAP-SNAPSHOT
ideaVersionName = 2023.3

coreVersion = 1.6.10
downloadIdeaSources = true

pluginTomlVersion = 233.6745.297
pluginTomlVersion = 233.9802.6

# Silences a build-time warning because we are bundling our own kotlin library
kotlin.stdlib.default.dependency = false
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jflex-skeleton = "org.jetbrains.idea:jflex:1.7.0-c1fdf11"
grammarKit = "org.jetbrains.idea:grammar-kit:1.5.1"

# Gradle Tooling
gradleToolingExtension = "com.jetbrains.intellij.gradle:gradle-tooling-extension:233-EAP-SNAPSHOT"
annotations = "org.jetbrains:annotations:23.0.0"
gradleToolingExtension = "com.jetbrains.intellij.gradle:gradle-tooling-extension:233.9802.14-EAP-SNAPSHOT"
annotations = "org.jetbrains:annotations:24.0.0"
groovy = "org.codehaus.groovy:groovy-all:2.5.18"

asm = { module = "org.ow2.asm:asm", version.ref = "asm" }
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/facet/MinecraftFacetEditorTab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.demonwav.mcdev.asset.MCDevBundle
import com.demonwav.mcdev.asset.PlatformAssets
import com.demonwav.mcdev.platform.PlatformType
import com.intellij.facet.ui.FacetEditorTab
import com.intellij.util.ui.StartupUiUtil
import com.intellij.ui.JBColor
import javax.swing.JCheckBox
import javax.swing.JComponent
import javax.swing.JLabel
Expand Down Expand Up @@ -102,7 +102,7 @@ class MinecraftFacetEditorTab(private val configuration: MinecraftFacetConfigura
}

override fun createComponent(): JComponent {
if (StartupUiUtil.isDarkTheme) {
if (!JBColor.isBright()) {
spongeIcon.icon = PlatformAssets.SPONGE_ICON_2X_DARK
mcpIcon.icon = PlatformAssets.MCP_ICON_2X_DARK
mixinIcon.icon = PlatformAssets.MIXIN_ICON_2X_DARK
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/facet/MinecraftFacetEditorTabV2.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import com.intellij.facet.ui.FacetEditorTab
import com.intellij.openapi.observable.properties.GraphProperty
import com.intellij.openapi.observable.properties.PropertyGraph
import com.intellij.openapi.observable.util.not
import com.intellij.ui.JBColor
import com.intellij.ui.dsl.builder.Panel
import com.intellij.ui.dsl.builder.Row
import com.intellij.ui.dsl.builder.RowLayout
import com.intellij.ui.dsl.builder.bindSelected
import com.intellij.ui.dsl.builder.panel
import com.intellij.util.ui.StartupUiUtil
import javax.swing.Icon
import javax.swing.JComponent
import javax.swing.JLabel
Expand Down Expand Up @@ -84,7 +84,7 @@ class MinecraftFacetEditorTabV2(private val configuration: MinecraftFacetConfigu
{ afterChange { _ -> all(this, bukkit.auto, spigot.auto)(bukkit, spigot, paper) } },
)

val isDarkMode = StartupUiUtil.isDarkTheme
val isDarkMode = !JBColor.isBright()
val spongeIcon = if (isDarkMode) PlatformAssets.SPONGE_ICON_2X_DARK else PlatformAssets.SPONGE_ICON_2X
createRow(sponge, "Sponge", spongeIcon)

Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/insight/generation/ui/EventListenerWizard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ package com.demonwav.mcdev.insight.generation.ui
import com.intellij.ide.highlighter.JavaHighlightingColors
import com.intellij.openapi.editor.ex.util.EditorUtil
import com.intellij.openapi.wm.ex.IdeFocusTraversalPolicy
import com.intellij.ui.JBColor
import com.intellij.uiDesigner.core.GridConstraints
import com.intellij.util.ui.StartupUiUtil
import javax.swing.JLabel
import javax.swing.JPanel
import javax.swing.JSeparator
Expand All @@ -42,7 +42,7 @@ class EventListenerWizard(panel: JPanel?, className: String, defaultListenerName
classNameTextField.font = EditorUtil.getEditorFont()
listenerNameTextField.font = EditorUtil.getEditorFont()
publicVoidLabel.font = EditorUtil.getEditorFont()
if (StartupUiUtil.isDarkTheme) {
if (!JBColor.isBright()) {
publicVoidLabel.foreground = JavaHighlightingColors.KEYWORD.defaultAttributes.foregroundColor
} else {
publicVoidLabel.foreground =
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/platform/AbstractModuleType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import com.intellij.psi.PsiElement
import com.intellij.psi.PsiFile
import java.awt.Color
import javax.swing.Icon
import org.apache.commons.lang.builder.ToStringBuilder
import org.apache.commons.lang3.builder.ToStringBuilder

abstract class AbstractModuleType<out T : AbstractModule>(val groupId: String, val artifactId: String) {

Expand Down Expand Up @@ -61,7 +61,7 @@ abstract class AbstractModuleType<out T : AbstractModule>(val groupId: String, v
return
}
val manager = EntryPointsManager.getInstance(project)
val annotations = (manager as? EntryPointsManagerBase)?.ADDITIONAL_ANNOTATIONS as? MutableList<String> ?: return
val annotations = (manager as? EntryPointsManagerBase)?.customAdditionalAnnotations ?: return
ignoredAnnotations.asSequence()
.filter { annotation -> !annotations.contains(annotation) }
.forEach { annotations.add(it) }
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/platform/mcp/actions/SrgActionBase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import com.intellij.ui.LightColors
import com.intellij.ui.awt.RelativePoint
import java.awt.Point
import javax.swing.JComponent
import org.apache.commons.lang.StringEscapeUtils
import org.apache.commons.text.StringEscapeUtils

abstract class SrgActionBase : AnAction() {

Expand Down Expand Up @@ -119,7 +119,7 @@ abstract class SrgActionBase : AnAction() {
}

fun showSuccessBalloon(editor: Editor, element: PsiElement, text: String) {
val escapedText = StringEscapeUtils.escapeHtml(text)
val escapedText = StringEscapeUtils.escapeHtml4(text)
val balloon = JBPopupFactory.getInstance()
.createHtmlTextBalloonBuilder(escapedText, null, LightColors.SLIGHTLY_GREEN, null)
.setHideOnAction(true)
Expand Down

0 comments on commit ec2b1f3

Please sign in to comment.