DESCRIPTION

[repoView] Add Show In support for resources

Also convert other Show In commands (for repository, remote, fetch node,
push node, ref) to the platform Show In support.

To only list "Reflog" when a repository is selected, IShowInTargetList
is used.

To continue to support showing multiple files in the history view, or
files outside of the workspace, we also pass a HistoryPageInput to the
ShowInContext if possible.

Bug: 358936
Change-Id: I7d986900e713b581b7baa19a8e850a5ee37585a7


COMMENTS

author: Danika Greer
date: 2012-11-15 19:27:59.000000000

Uploaded patch set 4.

-------------------------------------
author: Danika Greer
date: 2012-11-15 19:29:01.000000000

Patch Set 4:

Fix tests that were failing because "Properties" is now no longer translated by EGit.

-------------------------------------
author: Brenden Conley
date: 2012-11-15 20:42:24.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3642/ 

-------------------------------------
author: Brenden Conley
date: 2012-11-15 21:07:18.000000000

Patch Set 4: I would prefer that you didn't submit this

Build Unstable 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3642/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2012-11-19 09:24:48.000000000

Patch Set 4: No score

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/3665/ 

-------------------------------------
author: Brenden Conley
date: 2012-11-19 09:41:18.000000000

Patch Set 4: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3665/ : SUCCESS

-------------------------------------
author: Sebastian Porter
date: 2012-11-22 14:22:20.000000000

Patch Set 4:

Properties [Alt+Enter] must not be removed. This should be in all context menus as last item (currently not the case in the Repo view ==> a bug).

The next patch set should also use the new helper that creates the 'Show In' menu with the key binding in the label.

-------------------------------------
author: Danika Greer
date: 2012-11-22 16:58:36.000000000

Patch Set 4:

> Properties [Alt+Enter] must not be removed. This should be in all context menus as last item (currently not the case in the Repo view ==> a bug).

It's not removed, see the command item for org.eclipse.ui.file.properties. It's only available for repository nodes though. But this is a separate issue.

OpenPropertiesCommand was the manual (and badly-named) implementation of Show In > Properties.

> The next patch set should also use the new helper that creates the 'Show In' menu with the key binding in the label.

The key binding is already shown here because we use <menu commandId="org.eclipse.ui.navigate.showInQuickMenu" ... Does it not show the key binding for you?

-------------------------------------
author: Sebastian Porter
date: 2012-11-22 17:10:31.000000000

Patch Set 4:

Ah, yes, it is there. Sorry about that.

It appears in the main menu but I don't see it in the context menu.

-------------------------------------
author: Sebastian Porter
date: 2012-11-22 17:25:23.000000000

Patch Set 4:

Sorry, the previous comment was a bit cryptic.

What I meant is:

- I can see the Properties menu entry.
- I can see the key binding for the 'Show In' item in the main menu but I don't see it in the context menu.

-------------------------------------
author: Danika Greer
date: 2012-11-22 21:45:48.000000000

Patch Set 4:

I tested it with 3.7 as a target platform, the key binding is shown in the context menu there. With 4.2 as target platform, it doesn't work. So I guess it's a bug in 4.2.

I also tried egit-4.2-staging.target, but Eclipse doesn't start because org.eclipse.emf bundles are missing.

-------------------------------------
author: Sebastian Porter
date: 2012-11-23 09:47:28.000000000

Patch Set 4:

I filed bug 394958 for the platform issue.

The key binding works in 4.x in the other EGit views with the helper you wrote. All other views in the SDK (except for the marker views) also do it like this, so I suggest we do the same for the 'Git Repositories' view. In addition, using the same approach everywhere makes it easier to understand and later update the code.

-------------------------------------
author: Danika Greer
date: 2012-11-24 13:05:47.000000000

Patch Set 4:

Ok, tried to add the "Show In" menu in code, but couldn't figure out how to do it as RepositoriesView uses the common navigator framework.

Am I supposed to add a <actionProvider> to the org.eclipse.ui.navigator.navigatorContent? Or do it like in CompareTreeView#createContextMenu?

-------------------------------------
author: Sebastian Porter
date: 2012-11-26 11:49:42.000000000

Patch Set 4:

> Am I supposed to add a <actionProvider> to the org.eclipse.ui.navigator.navigatorContent?

Yes. Note that currently the content extension does not specify an enablement and/or possible children. This needs to be added in order to to add action providers. In RepositoriesViewActionProvider.fillContextMenu(IMenuManager) you would then add the 'Show In' menu as done in the other views (using your helper) and make sure it appears at the right location. One would normally use "group.show" (ICommonMenuConstants.GROUP_SHOW), but the Repo view context menu is pretty messed up, so I guess this would place it somewhere at the top.

-------------------------------------
