Git Integration and Git Branch Change Listener

     I'm curretly working on a small plugin to display the current active branch of any git root directory in the ProjectView.  I've got it working for the most part, such that upon refresh of the view it will correctly display the currently active branch, however I'd like it to be able to listen for git branch changes and refresh the ProjectView so the changes are reflected.

     I see that this is quite easy with the most current version of the Git Integration / git4Idea, which contains the GitBranchesLister interface and the GitBranches class which I could add my listener too.  However this functionality seems to be very new and the default version shipped with IDEA 10.0.1 is git4Idea version 8.1 which was release quite a long time ago.  Is it possible to achieve similar functionality is that version?  If not, maybe someone who is working on the git4idea updates could give me an idea if the latest changes are going to go into the newest IDEA numbered build?

Thanks,

Alex


P.S.  I apologize of any of my terminology is off, this is my first time working with git and my first time making an IDEA plugin.

4 comments
Comment actions Permalink

Hello Alex,

Please disregard the version number in the plugin.xml of git4idea. The distribution
always includes the latest versions of all bundled plugins.

I'm curretly working on a small plugin to display the current
active branch of any git root directory in the ProjectView.  I've got
it working for the most part, such that upon refresh of the view it
will correctly display the currently active branch, however I'd like
it to be able to listen for git branch changes and refresh the
ProjectView so the changes are reflected.

I see that this is quite easy with the most current version of
the Git Integration / git4Idea, which contains the GitBranchesLister
interface and the GitBranches class which I could add my listener too.
However this functionality seems to be very new and the default
version shipped with IDEA 10.0.1 is git4Idea version 8.1 which was
release quite a long time ago.  Is it possible to achieve similar
functionality is that version?  If not, maybe someone who is working
on the git4idea updates could give me an idea if the latest changes
are going to go into the newest IDEA numbered build?

Thanks,

Alex

P.S.  I apologize of any of my terminology is off, this is my first
time working with git and my first time making an IDEA plugin.

---
Original message URL:
http://devnet.jetbrains.net/message/5284543#5284543


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hey Dimitry,

      Maybe I'm a bit confused about the versioning of IDEA and the bundled plugins which used to be freestanding, forgive me.  The plugin page itself for the Git Integration (http://plugins.intellij.net/plugin/?id=3033) say the latest release was 5/5/2009.  That seems quite a while ago, so maybe I'm wrong, but even just looking at the jars, the latest additions to the repository for for git4idea plugin are not included.  Granted, these changes were very recent (12/9/10) so I'm guessing they didn't make it into the 10.0.1 release of IDEA, but is it my understanding then that the lastest changes will be in the next incremental IDEA release?

Thanks again,

Alex

0
Comment actions Permalink

Hello Alex,

The plugin available in the plugin manager is the release for older versions
of IntelliJ IDEA, before it became bundled. We're not publishing updates
of bundled plugins to the plugin manager.

Once again, every release of IntelliJ IDEA includes the latest plugin code
from the repository for the moment the release was built.

Maybe I'm a bit confused about the versioning of IDEA and the
bundled plugins which used to be freestanding, forgive me.  The plugin
page itself for the Git Integration
(http://plugins.intellij.net/plugin/?id=3033) say the latest release
was 5/5/2009.  That seems quite a while ago, so maybe I'm wrong, but
even just looking at the jars, the latest additions to the repository
for for git4idea plugin are not included.  Granted, these changes were
very recent (12/9/10) so I'm guessing they didn't make it into the
10.0.1 release of IDEA, but is it my understanding then that the
lastest changes will be in the next incremental IDEA release?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Running into the same issue after 5 year...is there an equivalent of GitBranchesListener in the current intellij-community code? 

0

Please sign in to leave a comment.