Community
Participate
Working Groups
Bug 309551 added "Show In" actions in the context menu of git repositories. But "System Explorer" is disabled even though a git repository clearly does a have a unique file folder which could be use for it.
Created attachment 286565 [details] Screenshot
The real fix for this would be in platform. org.eclipse.ui.internal.ide.handlers.ShowInSystemExplorerHandler implements all this, but unfortunately requires an IResource as input. The EGit RepositoryTreeNodes adapt to java.io.File, which is what that handler uses internally anyway. The handler should be made to accept java.io.File as input. (Just as an aside: RepositoryTreeNode must not be made to adapt to IPath; that has too many unwanted side-effects.) EGit provides its own "Show in System Explorer" command, available on the working tree node and on file/folder nodes. That could be made available also on the node for the repository.
(In reply to Thomas Wolf from comment #2) > The real fix for this would be in platform. cHow to we proceed? move the ticket to platform? Thomas Can you contribute a patch? It sounds like you already know what todo.
The quick fix is to enable EGit's own "Show in System Explorer" command also for the repository node. Should navigate to the .git directory for bare repositories, and to the working tree directory for non-bare repositories. Or always to the .git directory? That would work for all Eclipse versions EGit supports (currently back to Neon.3). That part I could do. The fix in platform would be nice to have, but EGit should then make a feature test or version test and suppress its own command on platforms that do support java.io.File in the built-in ShowInSystemExplorerHandler. I don't think I'll have time in the near future to look at improving that platform handler.
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/182000
Gerrit change https://git.eclipse.org/r/c/egit/egit/+/182000 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=7a4201b81f9869e4525a9d6168130066fad410a1
Thanks Thomas!