Community
Participate
Working Groups
With code always changing, it could happen that API problem filters become stale. This could also happen due to changes in the filters themselves. In our current world we just leave the filters there and it is the responsibility of the user to clean them up. We could do better. We could hook into our builder and report when a filter is no longer used. The detection should: 1. work with a full and incremental build 2. create a problem marker on the resource (maybe the project?) the filter used to apply to 3. offer a quick-fix to remove the filter and / or open the property page
Created attachment 119211 [details] work in progress adds in new problem ids, type and ui elements. Still need to finish adding a hook to the filter store to ask for unused filters
*** Bug 244676 has been marked as a duplicate of this bug. ***
Created attachment 119437 [details] patch This patch allows the API builder to report about stale API problem filters an includes regression tests. Stale filters are detected in a full and incremental build, and have two quick fixes available (1) remove the filter (2) open the filters property page. Problems for stale filters are reported on the compilation unit the filter used to apply to.
Created attachment 119438 [details] icon icon for the the 'open property page' quick-fix. to be placed in o.e.p.api.tools.ui/icons/full/elcl/
released to HEAD, please verify Olivier.
I only see one quickfix for unused filter. I cannot directly remove the filter. I can only open the property page.
Th problem is that the hash code is not matching when we are trying to resolve if the problem selected for the quick fix and the underlying problem in the filter match. This is happening because a ',' is used as a delimiter in the filter handle, which also appears in a listing of method arguments in the handle: so we incorrectly end up splitting the string to recompute the hash code (thanks for finding this Olivier).
Created attachment 124557 [details] Proposed fix This patch is splitting the filter handle on ',' without also splitting the message arguments that can also contain ','. Michael, please review.
applied patch, remarking as fixed
verified