|
3 | 3 | import com.cedricziel.idea.typo3.TYPO3CMSProjectSettings; |
4 | 4 | import com.cedricziel.idea.typo3.index.RouteIndex; |
5 | 5 | import com.cedricziel.idea.typo3.routing.RouteReference; |
6 | | -import com.intellij.lang.annotation.Annotation; |
| 6 | +import com.intellij.codeInspection.ProblemHighlightType; |
7 | 7 | import com.intellij.lang.annotation.AnnotationHolder; |
8 | 8 | import com.intellij.lang.annotation.Annotator; |
9 | | -import com.intellij.openapi.editor.DefaultLanguageHighlighterColors; |
| 9 | +import com.intellij.lang.annotation.HighlightSeverity; |
10 | 10 | import com.intellij.openapi.util.TextRange; |
11 | 11 | import com.intellij.psi.PsiElement; |
12 | 12 | import com.intellij.psi.PsiReference; |
@@ -50,11 +50,18 @@ private void annotateRoute(@NotNull PsiElement psiElement, @NotNull AnnotationHo |
50 | 50 |
|
51 | 51 | if (allKeys.contains(value)) { |
52 | 52 | TextRange range = new TextRange(psiElement.getTextRange().getStartOffset(), psiElement.getTextRange().getEndOffset()); |
53 | | - Annotation annotation = annotationHolder.createInfoAnnotation(range, null); |
54 | | - annotation.setTextAttributes(DefaultLanguageHighlighterColors.STRING); |
| 53 | + annotationHolder |
| 54 | + .newAnnotation(HighlightSeverity.INFORMATION, "") |
| 55 | + .range(range) |
| 56 | + .highlightType(ProblemHighlightType.INFORMATION) |
| 57 | + .create(); |
55 | 58 | } else { |
56 | 59 | TextRange range = new TextRange(psiElement.getTextRange().getStartOffset() + 1, psiElement.getTextRange().getEndOffset() - 1); |
57 | | - annotationHolder.createWeakWarningAnnotation(range, "Unresolved route"); |
| 60 | + annotationHolder |
| 61 | + .newAnnotation(HighlightSeverity.WEAK_WARNING, "Unresolved route") |
| 62 | + .range(range) |
| 63 | + .highlightType(ProblemHighlightType.WEAK_WARNING) |
| 64 | + .create(); |
58 | 65 | } |
59 | 66 | } |
60 | 67 | } |
0 commit comments