coderazzi / aws_codeartifact_maven

Support to update AWS CodeArtifact credentials on maven IDEA projects.
MIT License
6 stars 6 forks source link

runnung the plugin with the latest version of IntelliJ throws exception #15

Open FrankHossfeld opened 5 months ago

FrankHossfeld commented 5 months ago

First, thank you, for your awesome work.

After updating IntellliJ to the latest version, I#ll get an exception while running the plugin saying:

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'net.coderazzi.aws_codeartifact_maven.LaunchAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: net.coderazzi.aws_codeartifact_maven]
    at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
    at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
    at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
    at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
    at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:199)

It looks like it is no bug, but needs improvements, to ensure, that it will work with upcoming versions of IntelliJ

FrankHossfeld commented 5 months ago

I'll take a look and realized, that the LaunchAction needs to override the public @NotNull ActionUpdateThread getActionUpdateThread(). Not hard to do.

But I am not sure, which value to return. Knowing that, I could do a PR. Should it be: ActionUpdateThread.BGT or ActionUpdateThread.EGT? And I have no idea of the impact. :-)

coderazzi commented 5 months ago

Thanks for reporting the bug, Frank, and for looking into it. I will check it asap and will get back to you, Best regards, Luis

On Sat, Apr 20, 2024 at 8:04 AM Frank Hossfeld @.***> wrote:

I'll take a look and see, that the LaunchAction needs to override the public @NotNull ActionUpdateThread getActionUpdateThread().

But I am not sure which value to return, otherwise I could do a PR. Should it be: ActionUpdateThread.BGT or ActionUpdateThread.EGT?

— Reply to this email directly, view it on GitHub https://github.com/coderazzi/aws_codeartifact_maven/issues/15#issuecomment-2067597068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH54IIFNA2S6SXURAZR2QTY6IOO3AVCNFSM6AAAAABGQIWHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGU4TOMBWHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

coderazzi commented 5 months ago

Hi, Frank, After re-reading your email, I see that it is no bug, just.a warning for future versions. My take is that most likely, EDT is needed, as it was using OLD_EDT before. But that, following the documentation ( https://plugins.jetbrains.com/docs/intellij/basic-action-system.html#action-implementation), BGT is preferred, I will check it.

BTW, which environment are you using? I have tested it with MacOS (Java 11) and Windows (Java 17), using the latest plugin and Idea versions, no error raised, and the compatibility analysis from Idea reports no issues either on this specific warning ( https://plugins.jetbrains.com/plugin/16777-aws-codeartifact--maven/edit/versions/stable)

Best regards, Luis

On Sun, Apr 21, 2024 at 6:19 PM coderazzi @.***> wrote:

Thanks for reporting the bug, Frank, and for looking into it. I will check it asap and will get back to you, Best regards, Luis

On Sat, Apr 20, 2024 at 8:04 AM Frank Hossfeld @.***> wrote:

I'll take a look and see, that the LaunchAction needs to override the public @NotNull ActionUpdateThread getActionUpdateThread().

But I am not sure which value to return, otherwise I could do a PR. Should it be: ActionUpdateThread.BGT or ActionUpdateThread.EGT?

— Reply to this email directly, view it on GitHub https://github.com/coderazzi/aws_codeartifact_maven/issues/15#issuecomment-2067597068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH54IIFNA2S6SXURAZR2QTY6IOO3AVCNFSM6AAAAABGQIWHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGU4TOMBWHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

FrankHossfeld commented 5 months ago

Hi Luis, yes, currently, it is a warning for future versions. I am using MacOS (Java 17). Except for the warning I have no issues. Works like a charm. :-) If you need someone to test, feel free to contact me. Thx & cu Frank

coderazzi commented 5 months ago

Hi, Frank, thanks for your offer, I have updated the plugin and made it available in the beta channel, with version 3.3.0 https://plugins.jetbrains.com/plugin/16777-aws-codeartifact--maven/edit/versions/beta/531704

Please let me know if you find any issues with it! (I have just tested it on Mac, with JDK 17) Thanks, and best regards, Lu.

On Mon, Apr 22, 2024 at 9:29 AM Frank Hossfeld @.***> wrote:

Hi Luis, yes, currently, it is a warning for future versions. I am using MacOS (Java 17). Except for the warning I have no issues. Works like a charm. :-) If you need someone to test, fieel free to contact me. Thx & cu Frank

— Reply to this email directly, view it on GitHub https://github.com/coderazzi/aws_codeartifact_maven/issues/15#issuecomment-2068923150, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH54IKPGYZHYXDRKWODW6DY6TKATAVCNFSM6AAAAABGQIWHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRYHEZDGMJVGA . You are receiving this because you commented.Message ID: @.***>