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

3 comments
Comment actions Permalink

You can either use com.intellij.util.Alarm or a standard Java API such as ScheduledExecutorService.scheduleAtFixedRate().

0
Comment actions Permalink

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,

0
Comment actions Permalink

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.

0

Please sign in to leave a comment.