Skip to content

Commit

Permalink
Remove depreacated method usage of AnnotationHolder in graphql and li…
Browse files Browse the repository at this point in the history
…tho plugins

Summary:
```
#c.i.c.d.i.AnnotationHolderImpl - 'AnnotationHolder.createInfoAnnotation()' method (the call to which was found in class com.facebook.litho.intellij.inspections.MethodCallAnnotator) is slow, non-incremental and thus can cause unexpected behaviour (e.g. annoying blinking), is deprecated and will be removed soon. Please use `newAnnotation(...).create()` instead [Plugin: com.facebook.litho.intellij]
com.intellij.diagnostic.PluginException: 'AnnotationHolder.createInfoAnnotation()' method (the call to which was found in class com.facebook.litho.intellij.inspections.MethodCallAnnotator) is slow, non-incremental and thus can cause unexpected behaviour (e.g. annoying blinking), is deprecated and will be removed soon. Please use `newAnnotation(...).create()` instead [Plugin: com.facebook.litho.intellij]
```

Reviewed By: jselbo

Differential Revision: D47658767

fbshipit-source-id: 018e489f96df38c115e17b7a7ace83071298ee99
  • Loading branch information
junliqin authored and facebook-github-bot committed Jul 21, 2023
1 parent 8a2ea29 commit 5d5780f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.lang.annotation.AnnotationHolder;
import com.intellij.lang.annotation.Annotator;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.project.Project;
Expand Down Expand Up @@ -122,7 +123,8 @@ private static void formatRequiredProp(
.ifPresent(
element ->
holder
.createInfoAnnotation(element, null)
.setTextAttributes(DefaultLanguageHighlighterColors.KEYWORD));
.newSilentAnnotation(HighlightSeverity.INFORMATION)
.textAttributes(DefaultLanguageHighlighterColors.KEYWORD)
.create());
}
}

0 comments on commit 5d5780f

Please sign in to comment.