Developing plugin that listens to VCS changes
Hi,
I want to develop a plugin that runs in 1-2 minutes intervals and check if the current branch is before or updated with the remote one.
I just need to know what should I implement in order to have something that works "all the time" in the background.
I went through the confluence but didn't find something that suites my needs.
I will appreciate a guideline on how to begin, or at least what kind of interface should I implement to achieve something that always listens and notify when need.
Thanks,
Maroun
Please sign in to leave a comment.
You can either use com.intellij.util.Alarm or a standard Java API such as ScheduledExecutorService.scheduleAtFixedRate().
Thanks for your reply.
If I had an action for example, it'll be ran when we click it (through the menu or anywhere else).
If I use `com.intellij.util.Alarm`, how the plugin will be triggered?
Thanks,
If you want your plugin to be active all the time, you can start your scheduled activity from a ProjectComponent or use a <postStartupActivity> extension point.