Community
Participate
Working Groups
The following problem was reported via the automated error reporting: Message: Unhandled event loop exception java.lang.ClassCastException: org.eclipse.wst.sse.ui.StructuredTextEditor cannot be cast to org.eclipse.egit.ui.internal.repository.RepositoriesView at org.eclipse.egit.ui.internal.repository.tree.command.RepositoriesViewCommandHandler.getView(RepositoriesViewCommandHandler.java:54) at org.eclipse.egit.ui.internal.repository.tree.command.LinkWithSelectionCommand.execute(LinkWithSelectionCommand.java:30) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90) at sun.reflect.GeneratedMethodAccessor.invoke(null:-1) at sun.reflect.DelegatingMethodAccessorImpl.invoke(null:-1) at java.lang.reflect.Method.invoke(null:-1) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) Bundles: | org.eclipse.e4.core.di | 1.5.0.v20150421-2214 | 1.6.0.v20160319-0612 | | org.eclipse.egit.ui | 4.0.0.201505260635-rc2 | 4.4.0.201605041135-m1 | | org.eclipse.ui | 3.107.0.v20150507-1945 | 3.108.0.v20160505-1310 | Operating Systems: | Linux | 3.13.0 | 3.19.0 | | MacOSX | 10.10.5 | 10.11.4 | | Windows | 5.1.0 | 10.0.0 | The above information is a snapshot of the collected data. Visit https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/problems/551bf2ace4b026254ee000c6 for the latest data.
Many of the EGit commands specify a default handler. This can be invoked via QuickAccess even when the handler is not active or when the view it belongs to is not active. This leads to a variety of exceptions: have some git views open (for instance, repositories view, project/package explorer with EGit-managed projects, ...) an have an editor with some file open. Set focus/activate the editor (place the text caret somewhere in the file). Now let's have some fun with Quick Access: * choose "Link with Selection" in Quick Access: that'll give you the CCE in the original bug description, possibly with another editor class). * choose "Refresh" in Quick Access: ditto "Open in Editor": java.lang.IndexOutOfBoundsException: Index: 0 at java.util.Collections$EmptyList.get(Collections.java:4454) at org.eclipse.egit.ui.internal.repository.tree.command.OpenInEditorCommand.execute(OpenInEditorCommand.java:27) "Change Credentials": java.lang.IndexOutOfBoundsException: Index: 0 at java.util.Collections$EmptyList.get(Collections.java:4454) at org.eclipse.egit.ui.internal.repository.tree.command.ChangeCredentialsCommand.execute(ChangeCredentialsCommand.java:31) "Compare with HEAD Revision": org.eclipse.core.commands.NotEnabledException: Trying to execute the disabled command org.eclipse.egit.ui.team.CompareWithHead at org.eclipse.core.commands.Command.executeWithChecks(Command.java:484) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210) at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:343) at org.eclipse.ui.internal.quickaccess.CommandElement.execute(CommandElement.java:72) "Remove from index": ditto and so on... This needs to be cleaned up: * Most handlers should be applicable only in a particular view, especially those from the repositoris view. * EGit sometimes uses command visibility for hiding inapplicable commands without setting a corresponding activeWhen on the handler. Thus the handler is active even when it should not be. Not a problem as long as only menus are used, but through Quick Access such handlers can still be invoked. Handlers should have corresponding "activeWhen" clauses. * The handlers that indeed might make good candidates for default handlers must not assume that the active part is a particular (EGit) view, or that a selection is of a particular king or even exists.
New Gerrit change created: https://git.eclipse.org/r/74327
Gerrit change https://git.eclipse.org/r/74327 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=96fe255d7820f6c35177f1c9727d3e2db11e4356
New Gerrit change created: https://git.eclipse.org/r/79093
Gerrit change https://git.eclipse.org/r/79093 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=2fe0d796fccce3247870a957a78d4e75bac474fa
New Gerrit change created: https://git.eclipse.org/r/82338
Gerrit change https://git.eclipse.org/r/82338 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=8e7cd94da8d072839eb861e99e76bc49a3c4eeac
New Gerrit change created: https://git.eclipse.org/r/83313
Gerrit change https://git.eclipse.org/r/83313 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=f9bf65864c70e585bf1bcfa0149195714e4441a4
New Gerrit change created: https://git.eclipse.org/r/84439
New Gerrit change created: https://git.eclipse.org/r/84438
New Gerrit change created: https://git.eclipse.org/r/84437
Gerrit change https://git.eclipse.org/r/84438 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=a44e7448f1f5a036223b57432d8866c49412dc81
Gerrit change https://git.eclipse.org/r/84437 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=01bda60c5937b0cfd272f4b21f679be6c45c9a00
Gerrit change https://git.eclipse.org/r/84439 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=b979970e6d36e7b728f5ca7f39056e8096925d7e
New Gerrit change created: https://git.eclipse.org/r/87770
Gerrit change https://git.eclipse.org/r/87770 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=1c85569eb900178ef182dad3ee73aed5ee509db7
*** Bug 511636 has been marked as a duplicate of this bug. ***
*** Bug 511637 has been marked as a duplicate of this bug. ***
New Gerrit change created: https://git.eclipse.org/r/95382
Gerrit change https://git.eclipse.org/r/95382 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=ee406cbdd30b00730ce1aeae42deb735c56cb523
New Gerrit change created: https://git.eclipse.org/r/95454
Gerrit change https://git.eclipse.org/r/95454 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=55e1dadd03534212e829c6bea6398b8224974784
New Gerrit change created: https://git.eclipse.org/r/97142
Gerrit change https://git.eclipse.org/r/97142 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=6c1191dbf2da75f92b0d75d7bdb7124956729144
*** Bug 394365 has been marked as a duplicate of this bug. ***
New Gerrit change created: https://git.eclipse.org/r/102414
Gerrit change https://git.eclipse.org/r/102414 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=a0e6c966acaa71713e0557a7a172c75b2197c9f6
(In reply to Eclipse Genie from comment #28) > Gerrit change https://git.eclipse.org/r/102414 was merged to [master]. > Commit: > http://git.eclipse.org/c/egit/egit.git/commit/?id=a0e6c966acaa71713e0557a7a172c75b2197c9f6 Thomas, this added the following entry to plugin.properties: CompareWithHeadCommand.name = Compare commit with HEAD however, the same key is already used and present as CompareWithHeadCommand.name = Compare with HEAD Revision since 2010.
New Gerrit change created: https://git.eclipse.org/r/111008
(In reply to Dani Megert from comment #29) > Thomas, this added the following entry to plugin.properties: > CompareWithHeadCommand.name = Compare commit with HEAD > however, the same key is already used and present as > CompareWithHeadCommand.name = Compare with HEAD Revision > since 2010. Thanks for pointing this out. That plugin.properties is a mess. One of these days I'll have to sort the entries alphabetically. https://git.eclipse.org/r/111008 removes the duplicate.
Gerrit change https://git.eclipse.org/r/111008 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=ea4b5eebc3e1c8e2699cdbccb33b1c7ec95bc6dc
(In reply to Thomas Wolf from comment #31) > (In reply to Dani Megert from comment #29) > > Thomas, this added the following entry to plugin.properties: > > CompareWithHeadCommand.name = Compare commit with HEAD > > however, the same key is already used and present as > > CompareWithHeadCommand.name = Compare with HEAD Revision > > since 2010. > > Thanks for pointing this out. That plugin.properties is a mess. One of these > days I'll have to sort the entries alphabetically. Maybe your time would be spent more usefully if you provided a Gerrit change for bug 232034 :-). > https://git.eclipse.org/r/111008 removes the duplicate. Verified in master.
New Gerrit change created: https://git.eclipse.org/r/138779
Gerrit change https://git.eclipse.org/r/138779 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=97c96f88eee2178d5205cb27d6a08c6a74683cb6
New Gerrit change created: https://git.eclipse.org/r/151940
Gerrit change https://git.eclipse.org/r/151940 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=0cff7b2540d68ee4d1d54a423993177e5c3e27a4