Search in sources :

Example 1 with RemoveRedundantAnnotationRewriteOperation

use of org.eclipse.jdt.internal.corext.fix.NullAnnotationsRewriteOperations.RemoveRedundantAnnotationRewriteOperation in project che by eclipse.

the class NullAnnotationsFix method createRemoveRedundantNullAnnotationsOperations.

private static void createRemoveRedundantNullAnnotationsOperations(CompilationUnit compilationUnit, IProblemLocation[] locations, List<CompilationUnitRewriteOperation> result) {
    for (int i = 0; i < locations.length; i++) {
        IProblemLocation problem = locations[i];
        if (problem == null)
            // problem was filtered out by createCleanUp()
            continue;
        int problemId = problem.getProblemId();
        if (problemId == IProblem.RedundantNullAnnotation || problemId == IProblem.RedundantNullDefaultAnnotationPackage || problemId == IProblem.RedundantNullDefaultAnnotationType || problemId == IProblem.RedundantNullDefaultAnnotationMethod) {
            RemoveRedundantAnnotationRewriteOperation operation = new RemoveRedundantAnnotationRewriteOperation(compilationUnit, problem);
            result.add(operation);
        }
    }
}
Also used : IProblemLocation(org.eclipse.jdt.ui.text.java.IProblemLocation) RemoveRedundantAnnotationRewriteOperation(org.eclipse.jdt.internal.corext.fix.NullAnnotationsRewriteOperations.RemoveRedundantAnnotationRewriteOperation)

Aggregations

RemoveRedundantAnnotationRewriteOperation (org.eclipse.jdt.internal.corext.fix.NullAnnotationsRewriteOperations.RemoveRedundantAnnotationRewriteOperation)1 IProblemLocation (org.eclipse.jdt.ui.text.java.IProblemLocation)1