diff --git a/CHANGELOG.md b/CHANGELOG.md index 243652a7..499623d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ # AMII Changelog +## [1.1.4] + +### Fixed + +- Not being able to open any project from the Welcome Screen on the 2022.3 Beta build. + ## [1.1.3] ### Fixed diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index d03eca8a..6982f7e2 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -1,14 +1,3 @@ -### Added - -- Custom Content, please - documentation for more details! -- 2022.3 Build Support - ### Fixed -- `Show Previous Meme` not replaying sound for assets that have sound. -- Reactions when debugging Flutter tests on Windows. -- Issue - preventing [Apex unit tests](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm) - reactions from showing up - when [using the Illuminated Cloud 2](https://plugins.jetbrains.com/plugin/10253-illuminated-cloud-2) plugin. +- Not being able to open any project from the Welcome Screen on the 2022.3 Beta build. diff --git a/gradle.properties b/gradle.properties index 79403cac..951c4725 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ pluginGroup = io.unthrottled pluginName_ = Anime Memes -pluginVersion = 1.1.3 +pluginVersion = 1.1.4 pluginSinceBuild = 203.7148.57 pluginUntilBuild = 223.* # Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl @@ -15,10 +15,10 @@ platformVersion = 2022.2.1 platformDownloadSources = true # Plugin Dependencies -> https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_dependencies.html # Example: platformPlugins = com.intellij.java,com.jetbrains.php:203.4449.22 -platformPlugins = io.acari.DDLCTheme:88.1-1.4.0,NodeJS,Dart:222.3739.24,io.flutter:70.0.5 +platformPlugins = io.acari.DDLCTheme:88.1-1.5.4,NodeJS,Dart:222.3739.24,io.flutter:70.0.5 idePath= -#idePath=/Users/alexsimons/Library/Application Support/JetBrains/Toolbox/apps/WebStorm/ch-0 +#idePath=/Users/alexsimons/Library/Application Support/JetBrains/Toolbox/apps/WebStorm/ch-0/223.7401.14/WebStorm 2022.3 EAP.app/Contents #idePath=/home/alex/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7321754 #idePath=/home/alex/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/211.6085.15 diff --git a/src/main/kotlin/icons/AMIIIcons.kt b/src/main/kotlin/icons/AMIIIcons.kt index e3190190..d13e0b1a 100644 --- a/src/main/kotlin/icons/AMIIIcons.kt +++ b/src/main/kotlin/icons/AMIIIcons.kt @@ -34,6 +34,7 @@ object AMIIIcons { val E1F612 = IconLoader.getIcon("/icons/emojis/1f612.svg", javaClass) val E1F620 = IconLoader.getIcon("/icons/emojis/1f620.svg", javaClass) val E1F632 = IconLoader.getIcon("/icons/emojis/1f632.svg", javaClass) + @JvmField val E1F634 = IconLoader.getIcon("/icons/emojis/1f634.svg", javaClass) val E1F642 = IconLoader.getIcon("/icons/emojis/1f642.svg", javaClass) val E1F973 = IconLoader.getIcon("/icons/emojis/1f973.svg", javaClass) diff --git a/src/main/kotlin/io/unthrottled/amii/actions/FireIdleAction.kt b/src/main/kotlin/io/unthrottled/amii/actions/FireIdleAction.kt new file mode 100644 index 00000000..396975c1 --- /dev/null +++ b/src/main/kotlin/io/unthrottled/amii/actions/FireIdleAction.kt @@ -0,0 +1,26 @@ +package io.unthrottled.amii.actions + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.project.DumbAware +import io.unthrottled.amii.events.EVENT_TOPIC +import io.unthrottled.amii.events.UserEvent +import io.unthrottled.amii.events.UserEventCategory +import io.unthrottled.amii.events.UserEvents +import io.unthrottled.amii.tools.PluginMessageBundle + +class FireIdleAction : AnAction(), DumbAware { + override fun actionPerformed(e: AnActionEvent) { + val project = e.project + project?.messageBus + ?.syncPublisher(EVENT_TOPIC) + ?.onDispatch( + UserEvent( + UserEvents.IDLE, + UserEventCategory.NEUTRAL, + PluginMessageBundle.message("user.event.idle.name"), + project + ) + ) + } +} diff --git a/src/main/kotlin/io/unthrottled/amii/listeners/IdleEventListener.kt b/src/main/kotlin/io/unthrottled/amii/listeners/IdleEventListener.kt index 405e89cd..d144c4e1 100644 --- a/src/main/kotlin/io/unthrottled/amii/listeners/IdleEventListener.kt +++ b/src/main/kotlin/io/unthrottled/amii/listeners/IdleEventListener.kt @@ -26,7 +26,9 @@ import java.util.concurrent.TimeUnit class IdleEventListener(private val project: Project) : Runnable, Disposable, AWTEventListener { private val messageBus = ApplicationManager.getApplication().messageBus.connect() private val log = Logger.getInstance(this::class.java) - private val rootPane = BalloonTools.getIDEFrame(project).component + private val rootPane = lazy { + BalloonTools.getIDEFrame(project).component + } private var idleTimeout = TimeUnit.MILLISECONDS.convert( getCurrentTimoutInMinutes(), @@ -81,14 +83,14 @@ class IdleEventListener(private val project: Project) : Runnable, Disposable, AW idleAlarm.addRequest(this, idleTimeout) } - private val allowedMouseEvents = setOf( - MouseEvent.MOUSE_PRESSED, - MouseEvent.MOUSE_CLICKED, - ) + private val allowedMouseEvents = + MouseEvent.MOUSE_PRESSED or + MouseEvent.MOUSE_CLICKED + override fun eventDispatched(e: AWTEvent) { - if (e !is InputEvent || !UIUtil.isDescendingFrom(e.component, rootPane)) return + if (e !is InputEvent || !UIUtil.isDescendingFrom(e.component, rootPane.value)) return - if (e is MouseEvent && allowedMouseEvents.contains(e.id).not()) return + if (e is MouseEvent && (allowedMouseEvents and e.id) != e.id) return idleAlarm.cancelAllRequests() idleAlarm.addRequest(this, idleTimeout) diff --git a/src/main/kotlin/io/unthrottled/amii/memes/MemePanel.kt b/src/main/kotlin/io/unthrottled/amii/memes/MemePanel.kt index 5c916457..076db222 100644 --- a/src/main/kotlin/io/unthrottled/amii/memes/MemePanel.kt +++ b/src/main/kotlin/io/unthrottled/amii/memes/MemePanel.kt @@ -105,12 +105,11 @@ class MemePanel( private const val WHITE_HEX = 0x00FFFFFF private const val TENTH_OF_A_SECOND_MULTIPLICAND = 100 - private val ALLOWED_KEYS = setOf( - KeyEvent.VK_SHIFT, - KeyEvent.VK_CONTROL, - KeyEvent.VK_ALT, - KeyEvent.VK_META, - ) + private const val NON_FOCUS_LOSS_KEYS = + KeyEvent.VK_SHIFT or + KeyEvent.VK_CONTROL or + KeyEvent.VK_ALT or + KeyEvent.VK_META } private var alpha = 0.0f @@ -199,7 +198,7 @@ class MemePanel( ) { if ( isFocusLoss && - ALLOWED_KEYS.contains(event.keyCode).not() + (NON_FOCUS_LOSS_KEYS and event.keyCode) != event.keyCode ) { dismissMeme() } diff --git a/src/main/kotlin/io/unthrottled/amii/onboarding/UpdateNotification.kt b/src/main/kotlin/io/unthrottled/amii/onboarding/UpdateNotification.kt index e6f56315..4d48573d 100644 --- a/src/main/kotlin/io/unthrottled/amii/onboarding/UpdateNotification.kt +++ b/src/main/kotlin/io/unthrottled/amii/onboarding/UpdateNotification.kt @@ -22,11 +22,7 @@ private fun buildUpdateMessage(updateAsset: String): String = """ What's New?

See the documentation for features, usages, and configurations.
The changelog is available for more details. diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 786efd37..352150d7 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -102,6 +102,12 @@ description="Action calms down MIKU"> + +