presentation.setEnabled() doesn't work in IDEA 2019.2
已完成
In the plugin I have a menu item which should be able to enable/ disable dynamically.
As in https://intellij-support.jetbrains.com/hc/en-us/community/posts/206804545/comments/206241755
presentation.setEnabled(), presentation.setVisible() doesn't work in the 2019.2 intelliJ and later versions.
When I use below line in update() of an action in IDEA 2017, menu item is working fine (disabled but visible)
anActionEvent.getPresentation().setEnabled(false);
But in IDEA 2019.2 version same code results the menu Item go invisible. I couldn't make it visible even by adding below line
anActionEvent.getPresentation().setVisible(true);
Is this due to any change with the API or am I missing something. Thanks in advance for any help.
帖子评论已关闭。
You can recreate this issue by installing existing plugins as well. You will not be able to see disabled menu items from IntelliJ IDEA plugins in 2019.2 version
eg. : Kotlin plugin
In IntelliJ IDEA 2019.2
In IntelliJ IDEA 2017.1
Handled in https://youtrack.jetbrains.com/issue/IJSDK-685