DESCRIPTION

Bug 461266 - Nested project is not updated on project deletion

Change-Id: I70bd46016ceaf75b87abe5b6ecf8c50eb994a26a
Signed-off-by: Isis Velasquez xxx@xxx.xxx
Signed-off-by: Jayvion Booth xxx@xxx.xxx

COMMENTS

author: Jayvion Booth
date: 2016-05-08 18:13:00.000000000

Uploaded patch set 7.

-------------------------------------
author: Brenden Conley
date: 2016-05-08 18:13:06.000000000

Patch Set 7:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9369/

-------------------------------------
author: Jayvion Booth
date: 2016-05-08 18:15:08.000000000

Patch Set 7:

Pachset 7 fixes the synchronization issue inside NestedProjectManager. The map was changed while reading/iterating from it from another (UI) thread.

-------------------------------------
author: Brenden Conley
date: 2016-05-08 18:29:57.000000000

Patch Set 7: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9369/ : SUCCESS

-------------------------------------
author: Isis Velasquez
date: 2016-05-08 20:41:13.000000000

Patch Set 7:

Patch set #7 doesn't work for me.
I imported jbosstools-arquillian (use Import Existing Projects in workspace), switched to Hierarchical project layout, expanded the project "features" to see its children. Then I deleted the project "feature" with right-click > Delete. The "features" project didn't reappear.
Overall, I believe that the patch set #4 contains the right fix, and that the further tentative removed what actually fixes the bug (ie populating parent to refresh in the PRE_DELETE step, when project metadata are still available).

-------------------------------------
author: Isis Velasquez
date: 2016-05-08 20:41:21.000000000

Patch Set 7: Verified-1

-------------------------------------
author: Jayvion Booth
date: 2016-05-08 20:49:10.000000000

Patch Set 7:

> Patch set #7 doesn't work for me.
 > I imported jbosstools-arquillian (use Import Existing Projects in
 > workspace), switched to Hierarchical project layout, expanded the
 > project "features" to see its children. Then I deleted the project
 > "feature" with right-click > Delete. The "features" project didn't
 > reappear.

What do you mean with "not reappear"? If the project is deleted, why it should re-appear?
 
 > Overall, I believe that the patch set #4 contains the right fix,
 > and that the further tentative removed what actually fixes the bug
 > (ie populating parent to refresh in the PRE_DELETE step, when
 > project metadata are still available).

Exact this code was non functional. The refresh for this never occurred, just put the breakpoint in the actual refresh call: asyncExec() is never called from this PRE_DELETE path. Therefore I'pushed patchset 5.

-------------------------------------
author: Isis Velasquez
date: 2016-05-08 20:55:07.000000000

Patch Set 7:

> What do you mean with "not reappear"? 

The report, as I understand it is let's assume project A with a child B and a child C. A, B and C are projects.
With the project layout as hierarchical, bug 461266 reports that if one deletes B, then the folder "B" doesn't reappear without a refresh, so folder B and child project C are not visible.
With patch set 5. 6 and 7, it seems to me that there in no change regarding this issue: B would still be invisible as a folder upon project deletion.

>  The refresh for this never occurred, just put the breakpoint in the actual refresh call: asyncExec() is never called from this PRE_DELETE path.

I wouldn't affirm that the code fully works as expected, but with patch set #4, the issue explained above and in the bug report seems to be fixed.
The purpose is NOT to refresh on PRE_DELETE but to populate the parentsToRefresh on PRE_DELETE with the parent of the deleted project, then, once the deletion is performed, actually refresh parent on POST_CHANGE.

-------------------------------------
author: Isis Velasquez
date: 2016-05-08 21:00:26.000000000

Patch Set 7:

And actually, Patch Set #3 and #4 are most likely wrong too. If we want to populate and consume the parentsToRefresh as part of multiple invocations of resourceChanged (PRE_DELETE and POST_CHANGE), it seems like it has to be a field and connot be a method variable.

-------------------------------------
author: Jayvion Booth
date: 2016-05-08 21:48:46.000000000

Patch Set 7:

Patchset 8: I've changed the patchset 7 a bit: if the parent can't be found, a full refresh is triggered (just using the workspace root).

This works in both cases: if a project is deleted which contained children projects, the children are properly shown. If a nested child project is deleted, the parent is refreshed and a previously hidden folder is shown instead of the deleted project. 

All examples we discussed so far should now work.

-------------------------------------
author: Isis Velasquez
date: 2016-05-09 14:27:22.000000000

Patch Set 7:

@Andrey: can you reproduce the scenario of the video?

-------------------------------------
author: Gerrit Code Review
date: 2016-05-10 08:07:44.000000000

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

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