Community
Participate
Working Groups
I tried to clone platform.ui repo under Window in a workspace using http with my user. URL: git clone https://lvogel@git.eclipse.org/r/a/platform/eclipse.platform.ui I get: Error executing 'org.eclipse.egit.ui.RepositoriesViewClone': java.lang.ClassCastException: class org.eclipse.ui.navigator.resources.ProjectExplorer cannot be cast to class org.eclipse.egit.ui.internal.repository.RepositoriesView (org.eclipse.ui.navigator.resources.ProjectExplorer is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @a5f6d77; org.eclipse.egit.ui.internal.repository.RepositoriesView is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @71003a7e) Error executing 'org.eclipse.egit.ui.RepositoriesViewClone': java.lang.ClassCastException: class org.eclipse.ui.navigator.resources.ProjectExplorer cannot be cast to class org.eclipse.egit.ui.internal.repository.RepositoriesView (org.eclipse.ui.navigator.resources.ProjectExplorer is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @a5f6d77; org.eclipse.egit.ui.internal.repository.RepositoriesView is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @71003a7e) I did not open any EGit view yet. After opening the Git repository view, cloning works fine.
Stack trace, please. I bet this is because of the repository groups' node expansion.
Yep, was reported in our R&D too for 5.7 egit release: Steps to reproduce: Hit Ctrl+3 and choose Clone a Git Repository. In the field URI enter some url Press Next Press Next again Check the check box "Import all existing Eclipse projects after the clone finishes". org.eclipse.core.commands.ExecutionException: Error executing 'org.eclipse.egit.ui.RepositoriesViewClone': java.lang.ClassCastException: org.eclipse.ui.navigator.resources.ProjectExplorer cannot be cast to org.eclipse.egit.ui.internal.repository.RepositoriesVieworg.eclipse.core.commands.ExecutionException: Error executing 'org.eclipse.egit.ui.RepositoriesViewClone': java.lang.ClassCastException: org.eclipse.ui.navigator.resources.ProjectExplorer cannot be cast to org.eclipse.egit.ui.internal.repository.RepositoriesView at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:170) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213) at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommandInContext(LegacyHandlerService.java:440) at org.eclipse.ui.internal.quickaccess.providers.CommandElement.execute(CommandElement.java:61) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4930) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4451) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) at org.eclipse.equinox.launcher.Main.run(Main.java:1447) at org.eclipse.equinox.launcher.Main.main(Main.java:1420)Caused by: org.eclipse.e4.core.di.InjectionException: java.lang.ClassCastException: org.eclipse.ui.navigator.resources.ProjectExplorer cannot be cast to org.eclipse.egit.ui.internal.repository.RepositoriesView at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:318) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:252) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173) at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156) ... 31 moreCaused by: java.lang.ClassCastException: org.eclipse.ui.navigator.resources.ProjectExplorer cannot be cast to org.eclipse.egit.ui.internal.repository.RepositoriesView at org.eclipse.egit.ui.internal.repository.tree.command.RepositoriesViewCommandHandler.getView(RepositoriesViewCommandHandler.java:58) at org.eclipse.egit.ui.internal.repository.tree.command.CloneCommand.getView(CloneCommand.java:1) at org.eclipse.egit.ui.internal.repository.tree.command.CloneCommand.execute(CloneCommand.java:60) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) ... 35 more
Suspicion confirmed. Regression from https://git.eclipse.org/r/#/c/157762/ . Alex, could you take a look, please? AddCommand, CloneCommand, and CreateRepositoryCommand must also work if invoked from some other view; they're default handlers. And that must stay that way, otherwise the buttons in the repo view's toolbar will be shown disabled when some other part is active, but will still react on clicks.
New Gerrit change created: https://git.eclipse.org/r/160931
Gerrit change https://git.eclipse.org/r/160931 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=1dc6de219906fe50164434d6d1964c16e71a227b