Bug 574144 - Add "Show In"/"System Explorer" to Git Repositories view
Summary: Add "Show In"/"System Explorer" to Git Repositories view
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 5.13   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-11 02:17 EDT by Jörg Kubitz CLA
Modified: 2021-07-19 05:39 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot (44.81 KB, image/png)
2021-06-11 02:20 EDT, Jörg Kubitz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Kubitz CLA 2021-06-11 02:17:28 EDT
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.
Comment 1 Jörg Kubitz CLA 2021-06-11 02:20:06 EDT
Created attachment 286565 [details]
Screenshot
Comment 2 Thomas Wolf CLA 2021-06-11 03:10:32 EDT
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.
Comment 3 Jörg Kubitz CLA 2021-06-11 03:34:17 EDT
(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.
Comment 4 Thomas Wolf CLA 2021-06-11 04:21:00 EDT
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.
Comment 5 Eclipse Genie CLA 2021-06-15 13:44:34 EDT
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/182000
Comment 7 Jörg Kubitz CLA 2021-07-19 05:39:15 EDT
Thanks Thomas!