1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 327710 convinience method

This commit is contained in:
Alena Laskavaia 2010-10-18 00:26:54 +00:00
parent 187933d3c8
commit cf174d1afb

View file

@ -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;
}
}