Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315459 - "Show in" conextual menu item not shown
Summary: "Show in" conextual menu item not shown
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 0.8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.9.0-M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 14:52 EDT by Jakob Malm CLA
Modified: 2010-08-19 04:43 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Malm CLA 2010-06-02 14:52:12 EDT
Build Identifier: 20080911-1700

The contextual menu which is brought up when right clicking on a git controlled project, or any of its containing files, does not contain a "Show in" item. Because of this, I cannot find a way to get the entire project to history view (though individual files can be investigated by right click -> Compare With -> History...).

Using the latest nightly build (2 June, 2010).

Reproducible: Always

Steps to Reproduce:
1. Right-click a git-controlled project in the Project Explorer or Navigator views
Comment 1 Matthias Sohn CLA 2010-06-02 19:29:17 EDT
I checked with brand new 0.8.1 and found that Show In > History is only shown in Package Explorer. Need to investigate why.
Comment 2 Jakob Malm CLA 2010-06-03 03:14:30 EDT
(In reply to comment #1)
> I checked with brand new 0.8.1 and found that Show In > History is only shown
> in Package Explorer. Need to investigate why.

Ok, I do have the "Show In" item when using the Package Explorer, but I don't have a Show In > History item. This is with 0.8.1. At least, drag-n-dropping my project from the Package Explorer to the History view works (but it doesn't from Project Explorer).
Comment 3 Mathias Kinzler CLA 2010-06-09 07:13:36 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > I checked with brand new 0.8.1 and found that Show In > History is only shown
> > in Package Explorer. Need to investigate why.
> 
> Ok, I do have the "Show In" item when using the Package Explorer, but I don't
> have a Show In > History item. This is with 0.8.1. At least, drag-n-dropping my
> project from the Package Explorer to the History view works (but it doesn't
> from Project Explorer).

I investigated some more: the "Show In" item is shown
1. always in the Package Explorer (the standard view in the Java/Plug-in perspectives)
2. in the Project Explorer (the standard view in the Resources perspective), the Show In item is completely hidden unless the project has the "Java" nature assigned to it (has the following in .project):

	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
	</natures>

Can you confirm this behavior?
Comment 4 Jakob Malm CLA 2010-06-09 09:37:18 EDT
I can confirm this only partly.

1 a. Package Explorer, Java perspective. Has "Show In > History" for all "git-enabled" projects.

1 b. Package Explorer, other perspectives. No projects have "Show In > History", but projects can be "drag'n'dropped" to the History view, and the git history is shown. Shift-Alt-W doesn't have History view listed.

2. Project Explorer, any perspective. Never has "Show In" on right-click. However Shift-Alt-W has History view.
Comment 5 Mathias Kinzler CLA 2010-06-10 03:49:45 EDT
Ok, this makes things a bit clearer. As far as I can say, there are two problems:

I. The "Show In -> History" context menu is not shown in some perspective that you are using

I took the time to write some code to analyze this. In my Eclipse IDE (a RCP/Plugin-in developer IDE 3.5.2 + EGit), the History view is contributed to the following perspectives (by the respective plug-in):

1: org.eclipse.jdt.ui.JavaHierarchyPerspective by org.eclipse.jdt.ui
2: org.eclipse.jdt.ui.JavaBrowsingPerspective by org.eclipse.jdt.ui
3: org.eclipse.ui.resourcePerspective by org.eclipse.team.ui
4: org.eclipse.team.ui.TeamSynchronizingPerspective by org.eclipse.team.ui
5: org.eclipse.team.cvs.ui.cvsPerspective by org.eclipse.team.cvs.ui
6: org.eclipse.pde.ui.PDEPerspective by org.eclipse.pde.ui
7: org.eclipse.jdt.ui.JavaPerspective by org.eclipse.jdt.ui

That means that you (correctly) won't see the "Show In -> History" if you are not using one of the perspectives above. Could you confirm this? What is the perspective that you are using?

II. The "Show In" context menu is missing completely when you right-click on a "General" project (that is, a project that has no project natures assigned to it) in the Project Explorer, even though the Alt+Shift+W keyboard shortcut still shows the correct menu entries (i.e. the same sub-menu that would normally appear under the "Show In" menu). This looks like a bug somewhere else and can be worked around by using Alt+Shift+W from the keyboard.
Comment 6 Jakob Malm CLA 2010-06-15 10:40:59 EDT
I mostly use Pydev and CDT perspectives. I have now also started using the Resource perspective, to be able to work with git history. I can confirm that the Pydev and CDT perspectives do not have "Show In > History". The Resource perspective doesn't show a "Show In" item in the Package explorer context menu, but the Editor view does (with History item), and Shift-Alt-W also contains History.

(Off topic: I think that I was able to see all branches in my repository in the History view a week ago, or so. Has this been changed, because I can't seem to get that now?)
Comment 7 Mathias Kinzler CLA 2010-08-02 03:28:50 EDT
Gerrit code review on http://egit.eclipse.org/r/#change,1202
Merged as 15c7cc7262aa87dbf793a80c61a5cb9ba60664e0