DESCRIPTION

Allow commit on working tree in synchronize view

To easily commit all outstanding changes, we should provide the commit
action on the working tree node in Changeset mode.

Bug: 342039

Change-Id: I4c7e212e77ab0caa1525a93b12231616e444e655
Signed-off-by: Marley Hopkins xxx@xxx.xxx


COMMENTS

author: Marley Hopkins
date: 2011-04-28 10:03:36.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2011-04-28 10:03:45.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/529/ 

-------------------------------------
author: Brenden Conley
date: 2011-04-28 10:04:54.000000000

Patch Set 2: Build Failed

Build Failed 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/529/ : FAILURE

-------------------------------------
author: Marley Hopkins
date: 2011-04-28 10:10:04.000000000

Patch Set 2:

Dariuz, the culprit was the mapping as it did not return exact traversals (only projects) for the resources included in this model container.

Regarding the resources outside of the workspace: I'm not sure if we should handle this case here. Maybe the commit dialog should warn the user that there may be resources outside of the workspace.

-------------------------------------
author: Leslie Stephenson
date: 2011-04-28 10:15:52.000000000

Patch Set 2: I would prefer that you didn't submit this

(1 inline comment)

Now it looks better. Resources from <staged changes> are now selected in commit dialog (when you select 'commit' action on this node), but I got NPE when I try to commit changes from <working tree> node while there was an changes in closed project, here a stacktrace:
java.lang.NullPointerException
	at org.eclipse.egit.ui.internal.actions.RepositoryActionHandler.extractResourcesFromMapping(RepositoryActionHandler.java:464)
	at org.eclipse.egit.ui.internal.actions.RepositoryActionHandler.getSelectedResources(RepositoryActionHandler.java:452)
	at org.eclipse.egit.ui.internal.actions.RepositoryActionHandler.getSelectedResources(RepositoryActionHandler.java:430)
	at org.eclipse.egit.ui.internal.actions.CommitActionHandler.execute(CommitActionHandler.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.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:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	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(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)


The issue with non-workspace files in commit dialog is already know and as you said it should be fixed in separate changeset.

Line:58, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/mapping/GitContainerMapping.java -> Curly brackets are not needed here ;)

-------------------------------------
author: Leslie Stephenson
date: 2011-04-28 10:16:55.000000000

Patch Set 2: (1 inline comment)

minor style nit

Line:13, /COMMIT_MSG -> I think that this empty line should be removed

-------------------------------------
author: Marley Hopkins
date: 2011-04-28 10:34:05.000000000

Patch Set 2:

Dariusz, I'm sorry but I cannot reproduce the NPE with closed projects. But it makes sense to not give out null Traversals, they're now removed in the current patchset. Could you try to reproduce the problem?

Fixed style nit.

-------------------------------------
