DESCRIPTION

[sync] Allow to move changes in compare editor for working tree file

Now in 'Git Commits' model you can move particular hunk in files from
'<working tree>' node between working copy and staged version. All
changes are persisted to file system/git index after saving compare
results.

To add this functionality we need to wrap team's specific OpenInCompare
action into our own (GitOpenInCompare) action, because team framework
forces right hand side to be always read only. We want this writable
instead since we want to move changes from working copy to git index.

Change-Id: Ib38ee2d05934aa0f5cb9ddec9b5be91cbbe38759
Signed-off-by: Leslie Stephenson xxx@xxx.xxx


COMMENTS

author: Leslie Stephenson
date: 2011-10-28 09:38:20.000000000

Uploaded patch set 9.

-------------------------------------
author: Brenden Conley
date: 2011-10-28 09:50:46.000000000

Patch Set 9:

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

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

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

Build Unstable 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1839/ : UNSTABLE

-------------------------------------
author: Douglas Trujillo
date: 2011-10-28 23:12:57.000000000

Patch Set 9:

works like a charm for the described use case 

I think it would make sense if this would also hunks of untracked files could be staged in this way, also the other way round it should also be possible to revert staging of previously unstaged changes

-------------------------------------
author: Douglas Trujillo
date: 2011-10-28 23:14:32.000000000

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

when leaving Eclipse after testing this change I hit the following exception


!ENTRY org.eclipse.ui.workbench 4 2 2011-10-29 01:14:25.401
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.team.internal.ui.synchronize.LocalResourceSaveableComparison.getName(LocalResourceSaveableComparison.java:250)
	at org.eclipse.ui.internal.EditorManager.saveAll(EditorManager.java:1193)
	at org.eclipse.ui.internal.Workbench$19.run(Workbench.java:1184)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.Workbench.saveAllEditors(Workbench.java:1133)
	at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1051)
	at org.eclipse.ui.internal.Workbench.access$15(Workbench.java:1035)
	at org.eclipse.ui.internal.Workbench$25.run(Workbench.java:1279)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1277)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1249)
	at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:727)
	at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:715)
	at org.eclipse.ui.internal.WorkbenchWindow$5.run(WorkbenchWindow.java:860)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:858)
	at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:741)
	at org.eclipse.jface.window.Window$3.shellClosed(Window.java:687)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
	at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:610)
	at org.eclipse.swt.widgets.Shell.windowShouldClose(Shell.java:2256)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5469)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2092)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2252)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5535)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4989)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5138)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3610)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	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)

-------------------------------------
author: Jaylon Avila
date: 2011-10-28 23:23:02.000000000

Patch Set 9:

See bug 347557 and its duplicates.

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