2011/2/16 Alex Blewitt <alex.blewitt@xxxxxxxxx>
2011/2/16 Matthias Sohn <matthias.sohn@xxxxxxxxxxxxxx>
Very strange… I installed the nightly build result into my IDE (took me a few tries to get across the MD5 error), and now I see that the “Remote” sub-menu has disappeared (in my freshly upgraded IDE).
Then I started a target IDE with some Git-shared projects and everything works fine (I don’t have any EGit projects in the first IDE, so they should both use the same code)…
Now I’m a bit stuck, as I don’t know how to debug this…
Does anybody have an idea?
The “Remote” sub-menu enablement is true for single project selection plus the result of a Property tester that checks if the selected project is shared with Git…
For me this also happens in the target IDE, so if I start current master in the debugger the menu is also gone.
I'll try locally to revert this property tester change to see if this is causing the trouble.
When reverting commit c0a016c80fa the menu is back, so it seems there are some circumstances when this conditional logic
An NPE in the tester can cause this behaviour.
I tried to debug that and found that
is not called when opening the Team menu. So it looks like the plugin.xml definition for enabling that is wrong.
It works sometimes though.
It is called iff it's a project, and the gitshared is true. So if it's not a project it won't be.
Why dont we have the project adaptable to a IGitRepositiry (or similar). Then instead of having lots if places where we do complex checks, we can simply ask if it adapts to IGitRepository.
This will also save plugins doing the converting themselves and potentially permit you to highlight a group of projects and get a group of repositories back.