Community
Participate
Working Groups
When EGit 0.11 is installed, it adds a Team -> Remotes subcategory. However, this is visible for all projects and resources, even when the project/resource under question is not shared or not shared by a Git provider. The actions under the Remotes are disabled, but the Remotes should not be visible unless the resource is on a project under Git control.
The action "Fetch from Gerrit..." is enabled under the "Remote" menu item. Unfortunately it leads to a NPE: java.lang.NullPointerException at org.eclipse.egit.core.RepositoryUtil.getRepositoryName(RepositoryUtil.java:239) at org.eclipse.egit.ui.internal.fetch.FetchGerritChangePage.<init>(FetchGerritChangePage.java:108) at org.eclipse.egit.ui.internal.fetch.FetchGerritChangeWizard.addPages(FetchGerritChangeWizard.java:38) at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:603) at org.eclipse.jface.window.Window.create(Window.java:431) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089) at org.eclipse.jface.window.Window.open(Window.java:790) at org.eclipse.egit.ui.internal.commands.shared.FetchChangeFromGerritCommand.execute(FetchChangeFromGerritCommand.java:30) 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.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:1053) 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:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
(In reply to comment #1) > The action "Fetch from Gerrit..." is enabled under the "Remote" menu item. > Unfortunately it leads to a NPE: Probably a related but separate bug. Of course, if there is no EGit project then any action will fail; but if the menu isn't visible then it shouldn't be there. Can you raise a separate bug for that? The action should only be enabled on resources whose project is under EGit anyway, in case someone has defined a global key action for it.
I don't think we need a separate bug for the NPE. *** This bug has been marked as a duplicate of bug 336716 ***
*** Bug 337237 has been marked as a duplicate of this bug. ***