Where to put initialize/uninitialize code in plugin?

Hey everyone,

So I've been doing some work on a plugin for IDEA 14.x. I'm wondering where's the right place to put code that should run exactly once when the plugin is loaded, and code that should run exactly once when the IDE is closing (or the plugin is being unloaded). Reason being that I'm using a third party Java library, and it requires me to call some static methods before I can make use of it (an init/cleaup sort of thing). It would be convenient if the IDEA SDK has some hooks I can use to do this sort of thing. I'm going over the docs for but nothing is standing out right now. Anyone have any ideas?


Thanks!

2 comments
Comment actions Permalink

An ApplicationComponent is what you need for this.

0
Comment actions Permalink

Thanks, that did the trick! :)

0

Please sign in to leave a comment.