public static SignatureAnnotationRewriteOperation createAddAnnotationOperation(CompilationUnit compilationUnit, IProblemLocation problem, String annotationToAdd, String annotationToRemove,
Set<String> handledPositions, boolean thisUnitOnly, boolean allowRemove, boolean isArgumentProblem, ChangeKind changeKind) {
SignatureAnnotationRewriteOperation result;
if (changeKind == ChangeKind.OVERRIDDEN)
result= createAddAnnotationToOverriddenOperation(compilationUnit, problem, annotationToAdd, annotationToRemove, allowRemove);
else
result= createAddAnnotationOperation(compilationUnit, problem, annotationToAdd, annotationToRemove, changeKind == ChangeKind.TARGET,
thisUnitOnly, allowRemove, isArgumentProblem);
if (handledPositions != null && result != null) {
if (handledPositions.contains(result.getKey()))
return null;
handledPositions.add(result.getKey());
}
return result;
}