Bug 146609 - [CommonNavigator] Need way to re-evaluate content extensions in common navigator
Summary: [CommonNavigator] Need way to re-evaluate content extensions in common navigator
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-12 11:44 EDT by Min Idzelis CLA
Modified: 2019-09-06 16:04 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Min Idzelis CLA 2006-06-12 11:44:11 EDT
If a common nav content extensions is filtered out based on its trigger points, and later something happens to the project that makes the trigger points apply the content extensions are never reevaluated. 

We need a lazy way (via ext pts) to specify under what conditions the project content extensions should be reevaluated. 

A common case is in WTP when content extensions only apply based on a certain combination of facets. Would be nice to re-query the relevent content extensions when one of the facets that it requires is added or removed from the project.
Comment 1 Michael D. Elder CLA 2006-06-26 14:41:08 EDT
The best work around for now is to trigger the cache to flush itself. You can do this by activating an empty set. This will not change the active extensions, but will cause the flush event to clear out the remembered evaluations. 

INavigatorContentService.getActivationService().activateExtensions(new String[]{}, false)
Comment 2 Ying Chen CLA 2006-08-24 14:45:24 EDT
I would like to know whether this would be fixed for WTP 1.5.1 ?
Otherwise - I'll have to look into implementing the workaround.

Thanks.
Ying
Comment 3 Michael D. Elder CLA 2006-08-25 08:55:54 EDT
Currently, this is not targeted to 1.5.1. 
Comment 4 Min Idzelis CLA 2007-04-12 15:43:44 EDT
Don't forget about this! Please fix!
Comment 5 Francis Upton IV CLA 2010-03-05 05:12:40 EST
(In reply to comment #0)
 
> A common case is in WTP when content extensions only apply based on a certain
> combination of facets. Would be nice to re-query the relevent content
> extensions when one of the facets that it requires is added or removed from the
> project.

This seems like a resource-related request related the Project Explorer, as opposed to something that should be part of the CNF itself. If I understand it correctly, your use case would be triggered by a resource change notification which should then cause certain NCEs to be reevaluated.

So one way to do this might be to add an extension point to the org.eclipse.ui.navigator.resources plugin that specifies an expression (using the normal extension point expression mechanism) and specifies the identifier of the NCE that's to be reevaluated if that expression is true.  The expression would be evaluated on resource change events, and if true, trigger the reevalation of the specified NCE.

I'm a bit concerned about the performance of this mechanism however, as it would be checking this on every resource change (there is no way to register a resource change listener on only a subset of resources).

Does this seem in line with what you need?
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:04:55 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.