public interface AnnotationBuilder
Modifier and Type | Interface and Description |
---|---|
static interface |
AnnotationBuilder.FixBuilder |
Modifier and Type | Method and Description |
---|---|
AnnotationBuilder |
afterEndOfLine()
Specify annotation should be shown after the end of line.
|
void |
create()
Finish creating new annotation.
|
AnnotationBuilder |
enforcedTextAttributes(TextAttributes enforcedAttributes)
Override text attributes for the annotation to change the defaults specified for the given severity.
|
AnnotationBuilder |
fileLevel()
Specify annotation should be shown differently - as a sticky popup at the top of the file.
|
AnnotationBuilder |
gutterIconRenderer(GutterIconRenderer gutterIconRenderer)
Specify annotation should have an icon at the gutter.
|
AnnotationBuilder |
highlightType(ProblemHighlightType highlightType)
Specify the problem highlight type for the annotation.
|
AnnotationBuilder |
needsUpdateOnTyping()
Optimization method specifying whether the annotation should be re-calculated when the user types in it.
|
AnnotationBuilder |
needsUpdateOnTyping(boolean value)
Optimization method which explicitly specifies whether the annotation should be re-calculated when the user types in it.
|
AnnotationBuilder.FixBuilder |
newFix(IntentionAction fix)
Begin registration of the new quickfix associated with the annotation.
|
AnnotationBuilder.FixBuilder |
newLocalQuickFix(LocalQuickFix fix,
ProblemDescriptor problemDescriptor)
Begin registration of the new quickfix associated with the annotation.
|
AnnotationBuilder |
problemGroup(ProblemGroup problemGroup)
Specify problem group for the annotation to group corresponding inspections.
|
AnnotationBuilder |
range(ASTNode element)
Specify annotation range is equal to the
element.getTextRange() . |
AnnotationBuilder |
range(PsiElement element)
Specify annotation range is equal to the
element.getTextRange() . |
AnnotationBuilder |
range(TextRange range)
Specify annotation range.
|
AnnotationBuilder |
textAttributes(TextAttributesKey enforcedAttributes)
Specify text attributes for the annotation to change the defaults specified for the given severity.
|
AnnotationBuilder |
tooltip(java.lang.String tooltip)
Specify tooltip for the annotation to popup on mouse hover.
|
AnnotationBuilder |
withFix(IntentionAction fix)
Registers quick fix for this annotation.
|
AnnotationBuilder range(TextRange range)
Annotator.annotate(PsiElement, AnnotationHolder)
method is called with.
The passed range
must be inside the range of the current element being annotated.
This is an intermediate method in the creating new annotation pipeline.AnnotationBuilder range(ASTNode element)
element.getTextRange()
.
When not called, the current element range is used, i.e. of the element your Annotator.annotate(PsiElement, AnnotationHolder)
method is called with.
The range of the element
must be inside the range of the current element being annotated.
This is an intermediate method in the creating new annotation pipeline.AnnotationBuilder range(PsiElement element)
element.getTextRange()
.
When not called, the current element range is used, i.e. of the element your Annotator.annotate(PsiElement, AnnotationHolder)
method is called with.
The range of the element
must be inside the range of the current element being annotated.
This is an intermediate method in the creating new annotation pipeline.AnnotationBuilder afterEndOfLine()
AnnotationBuilder fileLevel()
AnnotationBuilder gutterIconRenderer(GutterIconRenderer gutterIconRenderer)
AnnotationBuilder problemGroup(ProblemGroup problemGroup)
AnnotationBuilder enforcedTextAttributes(TextAttributes enforcedAttributes)
AnnotationBuilder textAttributes(TextAttributesKey enforcedAttributes)
AnnotationBuilder highlightType(ProblemHighlightType highlightType)
AnnotationBuilder tooltip(java.lang.String tooltip)
AnnotationBuilder needsUpdateOnTyping()
AnnotationBuilder needsUpdateOnTyping(boolean value)
AnnotationBuilder withFix(IntentionAction fix)
newFix(IntentionAction)
instead.
This is an intermediate method in the creating new annotation pipeline.AnnotationBuilder.FixBuilder newFix(IntentionAction fix)
holder.newFix(action).range(fixRange).registerFix()
fix
- an intention action to be shown for the annotation as a quick fixAnnotationBuilder.FixBuilder newLocalQuickFix(LocalQuickFix fix, ProblemDescriptor problemDescriptor)
holder.newLocalQuickFix(fix).range(fixRange).registerFix()
fix
- to be shown for the annotation as a quick fixproblemDescriptor
- to be passed to QuickFix.applyFix(Project, CommonProblemDescriptor)
void create()