Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331240 - Egit does not work in e4
Summary: Egit does not work in e4
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 370570 327982 331258 331259 334136 341933 344704 345354 349721 350834 351350 351358 352149 352380 352382 352462 354831 355118 362201
Blocks: 330957
  Show dependency tree
 
Reported: 2010-11-26 15:19 EST by Lars Vogel CLA
Modified: 2012-11-13 14:45 EST (History)
6 users (show)

See Also:


Attachments
OneOfManyErrors (20.17 KB, image/png)
2010-11-26 15:19 EST, Lars Vogel CLA
no flags Details
howToGetTheError (43.31 KB, image/png)
2010-11-26 16:46 EST, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2010-11-26 15:19:38 EST
Created attachment 183955 [details]
OneOfManyErrors

Install egit from http://download.eclipse.org/egit/updates-nightly into e4.

Share a project via egit, select a resource, right click on it and select show in history -> error (see screenshot).

In general egit is not working in e4. Try playing through my egit tutorial: http://www.vogella.de/articles/EGit/article.html
Comment 1 Lars Vogel CLA 2010-11-26 15:22:40 EST
1.) Git Repo view does not work
2.) History view does not work
3.) Most Team actions do not work
Comment 2 Remy Suen CLA 2010-11-26 15:49:32 EST
No error stack trace?
Comment 3 Remy Suen CLA 2010-11-26 15:50:34 EST
(In reply to comment #0)
> Created an attachment (id=183955) [details]
> OneOfManyErrors

:o I read that as OutOfMemoryError.
Comment 4 Remy Suen CLA 2010-11-26 16:17:58 EST
There are problems retrieving commands from the command service it seems.

java.lang.NullPointerException
	at org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider.<init>(RepositoriesViewContentProvider.java:87)
	at org.eclipse.egit.ui.internal.clone.GitSelectRepositoryPage.createControl(GitSelectRepositoryPage.java:96)
	at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)

I however cannot get the CCE outlined in attachment 183955 [details]. How did you get it, Lars? I tried selecting a file in the 'Package Explorer' and showing the history of that and also from selecting the file via the Java editor and neither of those two triggered the error.
Comment 5 Lars Vogel CLA 2010-11-26 16:46:17 EST
Created attachment 183964 [details]
howToGetTheError

Here is how I get the error.
Comment 6 Remy Suen CLA 2010-11-26 17:03:13 EST
(In reply to comment #5)
> Created an attachment (id=183964) [details]
> howToGetTheError

Thanks. I was going through the 'Team' submenu instead of the 'Show In' one. Does opening the 'History' view through the 'Team' submenu work for you?

So either something is wrong with our ISources.SHOW_IN_INPUT and ISources.SHOW_IN_SELECTION handling or EGit is eagerly casting instead of using the adapter pattern. Will have to take a look see...
Comment 7 Remy Suen CLA 2010-11-26 17:17:18 EST
(In reply to comment #5)
> Created an attachment (id=183964) [details]
> howToGetTheError

Lars, I am getting this error on 3.x too. :O Please confirm, thanks.

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)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2601)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2565)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2399)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:669)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:662)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
Comment 8 Remy Suen CLA 2010-11-26 17:25:29 EST
(In reply to comment #7)
> Lars, I am getting this error on 3.x too. :O Please confirm, thanks.

See bug 331257.
Comment 9 Lars Vogel CLA 2010-11-26 17:37:46 EST
Remy, have a look at the Git repository view. You see the icons missing which are displayed in Eclipse 3.6.
Comment 10 Remy Suen CLA 2010-11-26 18:15:16 EST
(In reply to comment #1)
> 1.) Git Repo view does not work

Besides the icons (bug 331258) and the content provider failing to load (bug 331259), was there something else you had in mind, Lars?

> 2.) History view does not work

It works for you if you use the 'Team' submenu, correct? If not, please let me know what else is broken.

> 3.) Most Team actions do not work

I tried a few and they either worked or they failed (because of bug 331259). Did you notice anything else?

Thanks for bringing all of this to our attention, Lars!
Comment 11 Lars Vogel CLA 2010-11-27 15:22:50 EST
Hi Remy,

I thinks that is about that I can see. Once the errors have been fixed, I'm happy to test and try to find new errors.:-)

Best regards, Lars
Comment 12 Lars Vogel CLA 2012-11-13 14:45:36 EST
Fixed in Eclipse 4.2.1