Skip to content

Commit

Permalink
Merge pull request #10 from unv-unv/unv/annotation-create-fix
Browse files Browse the repository at this point in the history
Fixed missing create() call for new annotation.
  • Loading branch information
VISTALL authored Aug 10, 2024
2 parents 5e5b79e + 18acd34 commit 6af7418
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.intellij.java.language.psi.PsiClass;
import com.intellij.java.language.psi.PsiType;
import com.intellij.java.language.psi.util.InheritanceUtil;
import consulo.annotation.access.RequiredReadAction;
import consulo.language.editor.annotation.AnnotationHolder;
import consulo.language.editor.annotation.Annotator;
import consulo.language.editor.annotation.HighlightSeverity;
Expand All @@ -41,6 +42,7 @@
*/
public class GradleDslAnnotator implements Annotator {
@Override
@RequiredReadAction
public void annotate(@Nonnull PsiElement element, @Nonnull AnnotationHolder holder) {
if (element instanceof GrReferenceExpression referenceExpression) {
final GrExpression qualifier = ResolveUtil.getSelfOrWithQualifier(referenceExpression);
Expand Down Expand Up @@ -71,7 +73,8 @@ public void annotate(@Nonnull PsiElement element, @Nonnull AnnotationHolder hold
PsiElement nameElement = referenceExpression.getReferenceNameElement();
if (nameElement != null) {
holder.newSilentAnnotation(HighlightSeverity.INFORMATION)
.textAttributes(GroovySyntaxHighlighter.MAP_KEY);
.textAttributes(GroovySyntaxHighlighter.MAP_KEY)
.create();
}
}
}
Expand Down

0 comments on commit 6af7418

Please sign in to comment.