/** * Creates a new {@link IApiProblemFilter} * * @param componentid * @param problem * @param comment * @return the new {@link IApiProblemFilter} * @since 1.1 */ public static IApiProblemFilter newProblemFilter(String componentid, IApiProblem problem, String comment) { return new ApiProblemFilter(componentid, problem, comment); }
@Override public Object clone() { return new ApiProblemFilter(this.fComponentId, fProblem, fComment); }
/** * Internal use method that allows auto-persisting of the filter file to be * turned on or off * * @param problems the problems to add the the store * @param persist if the filters should be auto-persisted after they are * added */ @Override protected void internalAddFilters(IApiProblem[] problems, String[] comments) { if (problems == null || problems.length == 0) { return; } // This filter store doesn't handle resources so all filters are added // to GLOBAL Set<IApiProblemFilter> globalFilters = fFilterMap.get(GLOBAL); if (globalFilters == null) { globalFilters = new HashSet<>(); fFilterMap.put(GLOBAL, globalFilters); } for (int i = 0; i < problems.length; i++) { IApiProblem problem = problems[i]; String comment = comments != null ? comments[i] : null; IApiProblemFilter filter = new ApiProblemFilter(fComponentId, problem, comment); globalFilters.add(filter); } }
/** * Internal use method that allows auto-persisting of the filter file to be * turned on or off * * @param problems the problems to add the the store * @param persist if the filters should be auto-persisted after they are * added */ protected void internalAddFilters(IApiProblem[] problems, String[] comments) { if (problems == null || problems.length == 0) { return; } // This filter store doesn't handle resources so all filters are added // to GLOBAL Set<IApiProblemFilter> globalFilters = fFilterMap.get(GLOBAL); if (globalFilters == null) { globalFilters = new HashSet<>(); fFilterMap.put(GLOBAL, globalFilters); } for (int i = 0; i < problems.length; i++) { IApiProblem problem = problems[i]; String comment = comments != null ? comments[i] : null; IApiProblemFilter filter = new ApiProblemFilter(fComponent.getSymbolicName(), problem, comment); globalFilters.add(filter); } }
for (int i = 0; i < problems.length; i++) { IApiProblem problem = problems[i]; IApiProblemFilter filter = new ApiProblemFilter(fProject.getElementName(), problem, (comments == null ? null : comments[i])); String resourcePath = problem.getResourcePath(); if (resourcePath == null) {