private static SimpleTextAttributes addErrorHighlighting(boolean error, SimpleTextAttributes attributes) {
    final TextAttributes textAttributes = attributes.toTextAttributes();
    textAttributes.setEffectType(EffectType.WAVE_UNDERSCORE);
    textAttributes.setEffectColor(error ? JBColor.RED : JBColor.GRAY);
    return SimpleTextAttributes.fromTextAttributes(textAttributes);
  }
private static SimpleTextAttributes addErrorHighlighting(boolean error, SimpleTextAttributes attributes)