Issues with Git4Idea since 117.117

Hi,

I develop the heroku add-on for all Jetbrains IDE's and ran into issues with the latest update, the GitRepositoryManager changed from a class into an interface and is now implemented in GitRepositoryManagerImpl.

By now I could retrieve it with GitRepositoryManager.getInstance(project), now I tried project.getComponent(GitRepositoryManager.class) and project.getComponent(GitRepositoryManagerImpl.class) but both return null. (Btw. they worked while I still had the old libary from IDEA11 (pre 117) in the plugin classpath.)

The dependencies of my plugin are these:

    <idea-version since-build="117.117"/>

    <depends>com.intellij.modules.lang</depends>
    <depends>com.intellij.modules.platform</depends>
    <depends>com.intellij.modules.vcs</depends>
    <depends>Git4Idea</depends>



Any ideas?

Thanks,

Michael
1 comment
Comment actions Permalink

Are you sure you have your SDK set up correctly? The reason I'm asking is that I also encountered this API change, and by switching to project.getComponent(GitRepositoryManager.class) it works as before (using 117.180).

This is from Git4Idea plugin.xml:

  <project-components>
    <component>
      <interface-class>git4idea.repo.GitRepositoryManager</interface-class>
      <implementation-class>git4idea.repo.GitRepositoryManagerImpl</implementation-class>
      <headless-implementation-class>git4idea.repo.GitFakeRepositoryManager</headless-implementation-class>
    </component>
  </project-components>


AFAIK a project component should always be available by it's component interface class.

0

Please sign in to leave a comment.