DESCRIPTION

Bug 436645 - [CommonNavigator]
NavigatorContentDescriptorManager.EvaluationCache#getDescriptors does
not work

Added cache invalidation when INavigatorContentService.update() method
is called

Change-Id: I5437128f6672b5c2458ebb61489be7da0d4453f9


COMMENTS

author: Brock Pruitt
date: 2016-02-11 01:54:12.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-02-11 01:54:18.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2016-02-11 02:17:51.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Lilia Joyce
date: 2016-02-12 10:26:04.000000000

Patch Set 1: Code-Review-1

The cache activation in Neon might impact all CNF users and not only Sirius. I think the change should be documented and also the fact that if a triggerPoint/possibleChildren expression uses propertyTester which are dynamic, CNF extenders will have to listen to their changes in order to invalidate the cache. 

This appear like a regression to us: we use a CNF extension point and nothing tells us that property tester cannot be dynamic. When we use  org.eclipse.ui.menus extension point, there is nothing to do to keep this dynamic aspect of property tester(used in visibleWhen expressions for example)

I still wonder if this a good idea to cache test expression results and ask implementers/extenders to invalidate the cache. Might you decide to invalidate the cache on refresh/update of the CommonViewer ? Then between to update/refresh, the test evaluation result should be consistent and stay cached.

-------------------------------------
author: Brock Pruitt
date: 2016-02-12 21:04:12.000000000

Patch Set 1:

> Might you decide to invalidate the cache on refresh/update of the CommonViewer ?

Invalidating the cache on refresh is a possibility, but to preserve cache effectiveness it should probably be limited to the refresh of the viewer input. Invalidating cache on update is probably not a good idea since update is intended to be lightweight operation.

-------------------------------------
author: Lilia Joyce
date: 2016-02-15 08:23:56.000000000

Patch Set 1:

I agree on the update case.  But when you call the refresh of the viewer input or directly on one specific entry point, you expect that the whole structure might change, and the cache might have to be invalidated in order to obtain the expected result.

-------------------------------------
author: Brock Pruitt
date: 2016-02-15 20:05:55.000000000

Patch Set 1:

Would invalidating the cache on any refresh call allow existing Sirius code to work without any changes?

-------------------------------------
author: Lilia Joyce
date: 2016-02-16 08:45:19.000000000

Patch Set 1:

Hi Sergey, I launched our failing tests with CommonViewer modified to call the cache invalidation at the beginning of the refresh and they are ok. 
Then I tried some fast manual checks and everything lokked good.

-------------------------------------
author: Brock Pruitt
date: 2016-02-17 19:45:34.000000000

Patch Set 1:

Thank you for the suggestion.

-------------------------------------
author: Gerrit Code Review
date: 2016-02-18 15:12:26.000000000

Change has been successfully merged into the git repository by Brock Pruitt

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