@@ -60,16 +60,18 @@ public void annotate(@NotNull final PsiElement element, @NotNull final Annotatio
60
60
);
61
61
}
62
62
63
- holder .newAnnotation (CSV_COLUMN_INFO_SEVERITY , message )
63
+ AnnotationBuilder annotationBuilder = holder .newAnnotation (CSV_COLUMN_INFO_SEVERITY , message )
64
64
.range (element )
65
- .tooltip (tooltip )
66
- .enforcedTextAttributes (
67
- CsvEditorSettings .getInstance ().getValueColoring () == CsvEditorSettings .ValueColoring .RAINBOW ?
68
- CsvColorSettings .getTextAttributesOfColumn (columnInfo .getColumnIndex (), holder .getCurrentAnnotationSession ()) :
69
- null
70
- )
71
- .needsUpdateOnTyping (false )
72
- .create ();
65
+ .needsUpdateOnTyping (false );
66
+
67
+ if (CsvEditorSettings .getInstance ().getValueColoring () == CsvEditorSettings .ValueColoring .RAINBOW ) {
68
+ annotationBuilder .enforcedTextAttributes (CsvColorSettings .getTextAttributesOfColumn (columnInfo .getColumnIndex (), holder .getCurrentAnnotationSession ()));
69
+ }
70
+ if (tooltip != null ) {
71
+ annotationBuilder .tooltip (tooltip );
72
+ }
73
+
74
+ annotationBuilder .create ();
73
75
}
74
76
}
75
77
@@ -95,8 +97,8 @@ protected boolean handleSeparatorElement(@NotNull PsiElement element, @NotNull A
95
97
holder .getCurrentAnnotationSession ().putUserData (TAB_SEPARATOR_HIGHLIGHT_COLOR_DETERMINED_KEY , Boolean .TRUE );
96
98
}
97
99
}
98
- if (textAttributes != null ) {
99
- holder .newAnnotation (CSV_COLUMN_INFO_SEVERITY , showInfoBalloon ( holder . getCurrentAnnotationSession ()) ? "↹" : null )
100
+ if (textAttributes != null && showInfoBalloon ( holder . getCurrentAnnotationSession ()) ) {
101
+ holder .newAnnotation (CSV_COLUMN_INFO_SEVERITY , "↹" )
100
102
.range (element )
101
103
.enforcedTextAttributes (textAttributes )
102
104
.needsUpdateOnTyping (false )
0 commit comments