Summary: | [context] preserve filters in the resource navigator when using resourceFilters | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | z_Archived | Reporter: | David Shepherd <david.shepherd> | ||||||||||||
Component: | Mylyn | Assignee: | David Shepherd <david.shepherd> | ||||||||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
Severity: | enhancement | ||||||||||||||
Priority: | P1 | CC: | david.shepherd, steffen.pingel | ||||||||||||
Version: | unspecified | ||||||||||||||
Target Milestone: | 3.1 | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
Whiteboard: | |||||||||||||||
Attachments: |
|
Description
David Shepherd
2009-02-05 16:39:41 EST
I recall adding a mechanism for preserving filters contributed by XML. Are you saying that it's not there or that it's not working? Mik, there is a way to register id based filters and get them, but only class based filters are accounted for when determining the preserved filters. So, the framework is there, we just need to make use of it in some way. Created attachment 125342 [details]
proposed solution
David: please review and test.
Created attachment 125343 [details]
mylyn/context/zip
This patch does not work for me, as it does not preserve pattern-based filters in the resource navigator view. It likely preserves pattern filters in the common navigator view (untested by me), and for this reason might be worth keeping. The problem seems to be that the patch is working on the FocusCommonNavigatorAction when it should probably be working on the FocusResourceNavigatorAction. Let me know if you need further information.. This patch does work to preserve pattern filters in the common navigator view, I just tested it and it works well. Created attachment 125433 [details]
This patch will preserve filters for the resources view (assuming the first patch has already been applied).
Note: Because the Resources Navigator contains only a single filter for patterns, then if one pattern filter is preserved all must be preserved, and vice versa.
Created attachment 125434 [details]
mylyn/context/zip
David: Note the change that I made over your patch because your isPreservedFilter(..) would always return true. Please make sure to re-test this thoroughly to make sure that we are not preserving all filters. Patch applied. Have to get permission to include in 3.1, otherwise will have to backtrack patch. Unfortunately this patch does not work as I expected. Because the resource filters are all stored within a single class, the ResourcePatternFilter, then if any resource filter is specified as preserved then all resource pattern filters will be preserved. e.g., filterA and filterB are resourcepatternfilters, then if filterA is marked as preserved filterB is preserved as well. The problem is that the method isPreservedFilter(..) returns a true for the entire ResourcePatternFilter, which holds all resourcepatternfilter patterns. Each filter would have to be implemented as a separate filter to work. I think that this side-effect is acceptable, however, because it doesn't break my expectations too much. I usually want filters preserved in focus mode anyway, especially if I have marked one or more as preserved. Reopening to review. The documentation of the extension point should be updated and possibly the extension point itself. We currently support preserving of all resource filters in the resource navigator and expression filters in common navigator views based on ids. To make preservation of resource filters work on a more fine-grained level, the pattern that is intended to be preserved would need to be specified in the Mylyn extension point. Created attachment 127572 [details]
test
Updated documentation and reverted patch. Steffen: Please reverse David's patch since we won't support this for the resource Navigator view. Change in FocusResourceNavigatorAction reverted. |