diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java index b80d881d25f..80efe393f4f 100644 --- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java +++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractCheckerWithProblemPreferences.java @@ -220,4 +220,23 @@ public abstract class AbstractCheckerWithProblemPreferences extends return ((MapProblemPreference) problem.getPreference()) .getChildValue(key); } + + /** + * @param arg - actual problem argument + * @param problem - problem kind + * @param exceptionListParamId - parameter id of the parameter representing + * exception list for the given argumnet + * @return true if argument matches of the names in the exception list + * @since 2.0 + */ + public boolean isFilteredArg(String arg, IProblem problem, + String exceptionListParamId) { + Object[] arr = (Object[]) getPreference(problem, exceptionListParamId); + for (int i = 0; i < arr.length; i++) { + String str = (String) arr[i]; + if (arg.equals(str)) + return true; + } + return false; + } }