Skip to content

Commit

Permalink
Invoke delegated actions using built-in method
Browse files Browse the repository at this point in the history
The compatibility checker noticed that I was doing it wrong in 2024.3, and presumably therefore also in older versions.
  • Loading branch information
FWDekker committed Oct 31, 2024
1 parent bf25fc3 commit d3ff6cd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog
## 9.9.9-unreleased
### Fixed
* Change delegate action invocations to use built-in utility method instead.


## 3.3.3 -- 2024-10-16
### Changed
* In template icons, change the order of scheme colors to be clockwise starting from the top, instead of counterclockwise starting on the right.
Expand Down
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ dependencies {
dokkaHtmlPlugin("org.jetbrains.dokka", "versioning-plugin", properties("dokkaVersion"))

intellijPlatform {
intellijIdeaCommunity(properties("intellijVersion"))
intellijIdeaCommunity(
properties("intellijVersion"),
useInstaller = !properties("intellijVersion").endsWith("EAP-SNAPSHOT")
)

pluginVerifier()
zipSigner()
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ version=3.3.3
# 2019.4 (aka 2020.1).
# * `intellijVersion`:
# Use the oldest supported version, because that's what the plugin will be compiled against.
# If you want to test the EAP version of, say, IntelliJ 2024.3, use version number `243-EAP-SNAPSHOT`.
# * `pluginVerifierIdeVersions`:
# For every supported version minor release, include both the IC and the CL release with the highest patch version
# See also https://data.services.jetbrains.com/products?fields=name,releases.version,releases.build&code=IC,CL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.fwdekker.randomness.ui.PreviewPanel
import com.intellij.openapi.Disposable
import com.intellij.openapi.actionSystem.ActionGroup
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.ActionWrapperUtil
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.options.Configurable
Expand Down Expand Up @@ -63,11 +64,15 @@ class TemplateGroupAction(private val template: Template) :
* @param event carries contextual information
*/
override fun actionPerformed(event: AnActionEvent) =
getActionByModifier(
array = event.inputEvent?.isShiftDown ?: false,
repeat = event.inputEvent?.isAltDown ?: false,
settings = event.inputEvent?.isControlDown ?: false
).actionPerformed(event)
ActionWrapperUtil.actionPerformed(
event,
this,
getActionByModifier(
array = event.inputEvent?.isShiftDown ?: false,
repeat = event.inputEvent?.isAltDown ?: false,
settings = event.inputEvent?.isControlDown ?: false
)
)

/**
* Returns variant actions for the main insertion action.
Expand Down

0 comments on commit d3ff6cd

Please sign in to comment.