From cf174d1afbcfd0e65861f8418c924dc7d79b7c72 Mon Sep 17 00:00:00 2001 From: Alena Laskavaia Date: Mon, 18 Oct 2010 00:26:54 +0000 Subject: [PATCH] Bug 327710 convinience method --- ...AbstractCheckerWithProblemPreferences.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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; + } }