| Summary: | [CommonNavigator] activebydefault nonvisible commonfilter will no longer be activated once persistFilterActivationState() is called | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Ghaith Hachem <ghaith.hachem> |
| Component: | Runtime | Assignee: | Martin Schreiber <Martin.SCHREIBER> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Martin.SCHREIBER, mistria, pierre.dufay |
| Version: | 4.4.1 | ||
| Target Milestone: | 4.8 M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/35109 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d895c1a28181b69514a8e37bbf5d93cbd5cd1d29 |
||
| Whiteboard: | |||
|
Description
Ghaith Hachem
More tracing shows that the actual search for visible filter happens in persistFilterActivationState where the isVisibleInUi() is checked, this leads to the exclusion of all other filters even though they are indeed enabled Pushed a patch for review: https://git.eclipse.org/r/35109 As Ghaith mentioned, when persisting the active filter ids, the "active by default" non visible filters must also be stored in the pref store, otherwise they won't get activated after restart (restore). Changed the code, so that only non visible and not active by default filters are skipped when persiting the filter ids. After cross-checking with Ghaith, I submitted another patchset. The idea of the FilterActivationPreferenceKey seems to be to store the ids of the filters, the user has activated in the UI. So its not a good idea to store there the "visibleInUI=false;activeByDefault=true" filters there as well (which I used in the first patchset). The new patchset always adds the "visibleInUI=false;activeByDefault=true" filters to the active filters in the restoreFilterActivation() method. After that, all the visible in ui filters are handled by checking the FilterActivationPreferenceKey. If the key exists, add all filters defined there, if not, add all visibleInUI filters that are activeByDefault. Where do we stand on this bug? I am stuck on same problem. If status is still new, this means that a kind of workaround is actually done by developers, any hint? (In reply to Pierre Dufay from comment #4) > Where do we stand on this bug? I am stuck on same problem. If status is > still new, this means that a kind of workaround is actually done by > developers, any hint? This is still an issue for us, we personally didn't find any workaround. The fix submitted by Martin should probably still be valid but I did not check if the code changed much in Oxygen, maybe we should rebase it on the current master state or solve the merge conflict? Thanks for update. Please where could I get this patch? (In reply to Pierre Dufay from comment #6) > Thanks for update. Please where could I get this patch? The fix I mentioned is the one linked in comment 2 (https://git.eclipse.org/r/#/c/35109/) You could maybe override the INavigatorContentService implementation in the relevant navigator and sneak in your own INavigatorFilterService that has the fix implemented. The INavigatorFilterService interface is however marked with @noimplement and @noextend so proceed with caution. Patch in https://git.eclipse.org/r/35109 just needs minor tweaks, but it should be easily doable to get it in 4.8.M5. I'm sorry we missed this patch for 3 years... Gerrit change https://git.eclipse.org/r/35109 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d895c1a28181b69514a8e37bbf5d93cbd5cd1d29 Patch merged! Thanks a lot Martin, and sorry for this having been stale for no good reason. (In reply to Mickael Istria from comment #10) > Patch merged! Thanks a lot Martin, and sorry for this having been stale for > no good reason. Thanks for reviewing and merging. Don't worry about the delay! |