Starting plugin development - Application listeners and monitoring
Answered
Hi,
I try to get started with plugin development and I think I get the hang of it, but I am not really sure if I really have all the information available at hand.
Being a lazy developer, my goal is to implement an easy passive / monitoring timer, which keeps track of my work in my GIT repositories.
I already found the GitRepositoryChangeListener, but are there are other infos I'd like to get like: did the application lost focus and the user switched to a different application.
Also: where can or should plugin specific data be persisted. I'd like keep some stats for all projects - is there a persistence layer I can write to or do I have to set up something by myself?
Thanks in advance
Please sign in to leave a comment.
Also, is there Java doc available for the APIs?
> did the application lost focus and the user switched to a different application.
Check ApplicationActivationListener
> where can or should plugin specific data be persisted. I'd like keep some stats for all projects
You should extend PersistentStateComponent with a proper @Storage annotation. See GitVcsApplicationSettings for example.