Community
Participate
Working Groups
how to reproduce: 1) assert: make sure you have an unshared project in your workspace (ex. richfaces-webapp) 2) exec: create a new repository (in repo view or cli). Give it the very same name as your project (ex. richfaces-webapp) 3) exec: delete the repo in the view but not on the file-system 4) exec: team->share->git your project, check "use or create repository in parent folder of project", Hit "Create Repository" Result: Nothing happens that would be visible to the user. In the log you discover the following: <snip> java.lang.IllegalStateException: Repository already exists: /home/adietish/jboss-workspaces/jboss-tools/runtime-gwtfacet/richfaces-webapp/.git at org.eclipse.jgit.storage.file.FileRepository.create(FileRepository.java:245) at org.eclipse.jgit.lib.Repository.create(Repository.java:165) at org.eclipse.egit.ui.internal.sharing.ExistingOrNewPage$8.widgetSelected(ExistingOrNewPage.java:373) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard.openWizard(ConfigureProjectWizard.java:224) at org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard.shareProjects(ConfigureProjectWizard.java:124) at org.eclipse.team.internal.ui.actions.ConfigureProjectAction$1.run(ConfigureProjectAction.java:39) at org.eclipse.team.internal.ui.actions.TeamAction$3.run(TeamAction.java:266) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.team.internal.ui.actions.TeamAction.run(TeamAction.java:263) at org.eclipse.team.internal.ui.actions.ConfigureProjectAction.execute(ConfigureProjectAction.java:33) at org.eclipse.team.internal.ui.actions.TeamAction.run(TeamAction.java:515) at org.eclipse.team.internal.ui.actions.TeamAction.runWithEvent(TeamAction.java:549) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) 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:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386) </snip> The reason for the missing notification is that the IllegalStateException is not being catched in ExistingOrNewPage (line 389): <snip> } catch (IOException e1) { String msg = NLS .bind(UIText.ExistingOrNewPage_ErrorFailedToCreateRepository, gitDir.toString()); org.eclipse.egit.ui.Activator.handleError(msg, e1, true); } catch (CoreException e2) { String msg = NLS .bind(UIText.ExistingOrNewPage_ErrorFailedToRefreshRepository, gitDir); org.eclipse.egit.ui.Activator.handleError(msg, e2, true); } </snip>
I'll gladly propose a patch, if my current iteration plan allows me to :)