Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331257

Summary: CCE thrown when using 'Show In > History' on a Java file in the 'Package Explorer' view
Product: [Technology] EGit Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, matthias.sohn
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Remy Suen CLA 2010-11-26 17:24:57 EST
1. Ctrl+3 > Package Explorer
2. Expand and find a Java file that's in a configured source folder.
3. Select it > Alt+Shift+W > History
4. The 'History' view opens but it is showing nothing. :(

java.lang.ClassCastException: org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.eclipse.core.resources.IResource
	at org.eclipse.egit.ui.internal.history.GitHistoryPage.inputSet(GitHistoryPage.java:902)
	at org.eclipse.team.ui.history.HistoryPage.setInput(HistoryPage.java:59)
	at org.eclipse.egit.ui.internal.history.GitHistoryPage.setInput(GitHistoryPage.java:845)
	at org.eclipse.team.internal.ui.history.GenericHistoryView.showHistoryPageFor(GenericHistoryView.java:738)
	at org.eclipse.team.internal.ui.history.GenericHistoryView.showHistoryFor(GenericHistoryView.java:691)
	at org.eclipse.team.internal.ui.history.GenericHistoryView.showHistoryFor(GenericHistoryView.java:925)
	at org.eclipse.team.internal.ui.history.GenericHistoryView.show(GenericHistoryView.java:979)
	at org.eclipse.ui.internal.ShowInHandler.execute(ShowInHandler.java:78)
Comment 1 Remy Suen CLA 2010-11-26 17:35:47 EST
A suggested change set has been attached to Gerrit.
http://egit.eclipse.org/r/#change,1962
Comment 2 Matthias Sohn CLA 2010-11-28 17:06:44 EST
merged as 338b3c67df247f805a4b399859f52e1a59d0b14e