Is it a good idea to store Presentation as a field?
Answered
I have my own AnAction class and I'd like to update the icon of it at any given moment of time. This is not possible, because the icon can only be updated when update(AnActionEvent e) is called. Is it a bad idea to get the Presentation object from the AnActionEvent event and than store it somewhere else as a field? This works, I can update the Presentation at any time, but I am not sure if this is a good idea (maybe it prevents some objects from being disposed etc.)
Please sign in to leave a comment.
That's not a good idea. Please check the AnAction class JavaDocs:
Thank you!
works well. I don't need to store Presentation at all.