|
34 | 34 |
|
35 | 35 | public class NoRepoAnnotationReconciler implements JdtAstReconciler {
|
36 | 36 |
|
37 |
| - private static final String LABEL = "Remove Unnecessary @Repository"; |
| 37 | + private static final String PROBLEM_LABEL = "Unnecessary @Repository"; |
| 38 | + private static final String FIX_LABEL = "Remove Unnecessary @Repository"; |
38 | 39 | private static final String INTERFACE_REPOSITORY = "org.springframework.data.repository.Repository";
|
39 | 40 |
|
40 | 41 | private QuickfixRegistry registry;
|
@@ -67,18 +68,18 @@ public boolean visit(TypeDeclaration typeDecl) {
|
67 | 68 | if (isApplicableRepoAnnotation(a)) {
|
68 | 69 | ITypeBinding type = typeDecl.resolveBinding();
|
69 | 70 | if (type != null && isRepo(type)) {
|
70 |
| - ReconcileProblemImpl problem = new ReconcileProblemImpl(getProblemType(), LABEL, a.getStartPosition(), a.getLength()); |
| 71 | + ReconcileProblemImpl problem = new ReconcileProblemImpl(getProblemType(), PROBLEM_LABEL, a.getStartPosition(), a.getLength()); |
71 | 72 | String uri = docUri.toASCIIString();
|
72 | 73 | String id = NoRepoAnnotationOnRepoInterface.class.getName();
|
73 | 74 | ReconcileUtils.setRewriteFixes(registry, problem, List.of(
|
74 |
| -// new FixDescriptor(ID, List.of(uri), LABEL) |
| 75 | +// new FixDescriptor(ID, List.of(uri), FIX_LABEL) |
75 | 76 | // .withRangeScope(RewriteQuickFixUtils.createOpenRewriteRange(cu, typeDecl))
|
76 | 77 | // .withRecipeScope(RecipeScope.NODE),
|
77 | 78 | new FixDescriptor(id, List.of(uri),
|
78 |
| - ReconcileUtils.buildLabel(LABEL, RecipeScope.FILE)) |
| 79 | + ReconcileUtils.buildLabel(FIX_LABEL, RecipeScope.FILE)) |
79 | 80 | .withRecipeScope(RecipeScope.FILE),
|
80 | 81 | new FixDescriptor(id, List.of(uri),
|
81 |
| - ReconcileUtils.buildLabel(LABEL, RecipeScope.PROJECT)) |
| 82 | + ReconcileUtils.buildLabel(FIX_LABEL, RecipeScope.PROJECT)) |
82 | 83 | .withRecipeScope(RecipeScope.PROJECT)
|
83 | 84 | ));
|
84 | 85 | problemCollector.accept(problem);
|
|
0 commit comments