Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 232860 - [CommonNavigator] excludePatterns field in navigator extensions Binding class is pointless
Summary: [CommonNavigator] excludePatterns field in navigator extensions Binding class...
Status: CLOSED DUPLICATE of bug 425867
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 minor with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-19 17:01 EDT by Randall Theobald CLA
Modified: 2014-03-05 05:56 EST (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 Randall Theobald CLA 2008-05-19 17:01:15 EDT
Build ID: I20080502-0100

I am a performance analyst of an adopter product. I was investigating an issue in the class:

     org.eclipse.ui.internal.navigator.extensions.Binding

and noticed that my idea of caching the extensionId pattern match results was already implemented in the latest version. However, in the process I realized that the entire variable 'excludePatterns' has no effect (unless it is only there for subclasses, of which I found none).

In the method isVisibleExtension(..), once you have looped through all the inclusion patterns and not found a match, there is no way to return true, you always return false, so we might as well stop and return false and not loop through the exclusion patterns. Otherwise, there is a functional issue here and the exclusion patterns are not being respected (should be processed before the inclusion patterns?).

I may be missing something here, so let me know if I have, otherwise we can save any processing having to do with exclusion patterns.
Comment 1 Sébastien Gandon CLA 2012-02-16 05:29:26 EST
I need to exclude some content binding and the content provider is still called.
I have a include pattern like this "org.talend.repository.viewer.root.*" and an excludes pattern is "org.talend.repository.viewer.root.content.BusinessModelContent" but the BusinessModelContent Contetenr provider class is instanciated and called for root elements.
Looking at 
org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.getElements(Object){
Set rootContentExtensions = contentService.findRootContentExtensions(anInputElement);
		return internalGetChildren(anInputElement, anInputElement, rootContentExtensions, ELEMENTS);
}
the findRootContentExtensions does not filters the excluded content providers.
Comment 2 Matthieu Wipliez CLA 2014-03-05 05:41:09 EST
I think this should be marked as a duplicate of bug 425867 and closed.
Comment 3 Paul Webster CLA 2014-03-05 05:56:13 EST

*** This bug has been marked as a duplicate of bug 425867 ***