DESCRIPTION

Bug 461266 - Nested project is not updated on project deletion

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


COMMENTS

author: Brenden Conley
date: 2016-05-05 13:23:55.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2016-05-05 13:42:40.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Brock Pruitt
date: 2016-05-05 16:53:49.000000000

Patch Set 3:

(1 comment)

Line:41, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/nested/NestedProjectsContentProvider.java -> Would new HashSet<>() be sufficient?

-------------------------------------
author: Jayvion Booth
date: 2016-05-05 17:43:53.000000000

Patch Set 3: Code-Review-1

(4 comments)

Line:133, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/nested/NestedProjectsContentProvider.java -> This will fail if tree is disposed because view is closed already. Better: use PlatformUI.getWorkLeon Ochoach().getDisplay() which is always there.

Line:135, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/nested/NestedProjectsContentProvider.java -> at the very beginning I would check if the view is still there (e.g. getTree() is not disposed) and if it is disposed don't run anything.

Line:136, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/nested/NestedProjectsContentProvider.java -> If the resourceChanged() can be called from NON UI thread, this code will fail in different places with ConcurrentModificationException because the set is modified / iterated in different threads.

Better would be: remove the parentsTioRefresh *field*, made it local final variable in the resourceChanged() method. This way it cannot happen that it is modified from different threads at same time.

Second: I prefer to use LinkedHashSet over HashSet if I do iterations: this makes sure that the iteration order is stable and predictable. See http://javaclipse.blogspot.de/2016/03/stable-tests-and-transition-to-java-8.html

Line:139, bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/nested/NestedProjectsContentProvider.java -> if this will be not a field anymore, this call would be unneeded too.

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

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

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