DESCRIPTION

Synchronize View: show 'Add To Index' only when applicable

Also add 'Remove From Index', and make the menu entry order the same
for IResources and for GitModelObjects. Change the ResourceStateFactory
to work not only for IResource but also for java.io.File.

Bug: 355809
Change-Id: I2b111dd7be58c0b73d200278aa7f0fe2aaaccda9
Signed-off-by: Alayna Houston xxx@xxx.xxx


COMMENTS

author: Alayna Houston
date: 2015-12-02 22:24:28.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2015-12-02 22:24:34.000000000

Patch Set 2:

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

-------------------------------------
author: Alayna Houston
date: 2015-12-02 22:29:01.000000000

Patch Set 2: -Code-Review

Previous test failure was due to an IFolder resource that didn't exist on disk as a File. In PS 1 I had mapped resources to files but forgotten that I'd lose the "handle" aspect of a resource.

-------------------------------------
author: Brenden Conley
date: 2015-12-02 22:49:08.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7909/ : SUCCESS

-------------------------------------
author: Alayna Houston
date: 2015-12-03 17:06:10.000000000

Patch Set 2:

This should solve the final outstanding case from bug 355809. Works in my tests, except for interactions with other bugs relating to this Synchronize View, for instance bug 483404. In my tests, this works otherwise well in the workspace model. In the "Git Commits" model, the display of the actions works, but on nodes for deleted files, things go a bit haywire: the 'Ignore' action, for instance, is disabled.

One part of the problem is GitAdapterFactory, lines 110ff, which constructs a bogus resource containing the absolute path in git (i.e., in my case /Users/<username>/Git/<repo>/<project>/<deleted_file>) as a _workspace local_ path, which then later on leads to strange effects because Eclipse takes the first component of such a local path as the project name and concludes that there is no project "Users". If I do create a project "Users" and share it with the same repo, then the 'Ignore' action is enabled, but doesn't do anything.

This is very broken, but hasn't got anything to do with this change, which is about the display of these actions. I intend to use ResourceState computed from File in the repositories view next, where the 'Add to Index' action also is generally enabled in the work tree.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-12-06 22:50:27.000000000

Change has been successfully merged into the git repository by Jayvion Booth

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