mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 327710 convinience method
This commit is contained in:
parent
187933d3c8
commit
cf174d1afb
1 changed files with 19 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue