Action create before Application componnet?
Answered
Hi, Can anybody tell me why action lifecycle is changed in current Intellij CE?
After Intellij community 2016.1 version, I found my plugin crash due to NPE.
I debug source code, found that action registered in configuration xml is created before my application component.
current process: action create -> application component create
While in previous version, action is created after application component construction
previous process: application component create -> action create
Please sign in to leave a comment.
Actions are preloaded now as early as possible, for the popup menus to open faster the first time.
In general, I'd suggest to not have any logic in the action constructor, and retrieve the component when it's needed, presumably in update/actionPerformed.