@NotNull
  private static Map<TextRange, TextAttributesKey> variableHighlights(@NotNull Template template, @NotNull TemplateState templateState) {
    Map<TextRange, TextAttributesKey> rangesToHighlight = new HashMap<>();
    for (int i = 0; i < templateState.getSegmentsCount(); i++) {
      TextRange segmentOffset = templateState.getSegmentRange(i);
      String name = template.getSegmentName(i);
      TextAttributesKey attributesKey;
      if (name.equals(PRIMARY_VARIABLE_NAME)) {
        attributesKey = EditorColors.WRITE_SEARCH_RESULT_ATTRIBUTES;
      }
      else if (name.equals(OTHER_VARIABLE_NAME)) {
        attributesKey = EditorColors.SEARCH_RESULT_ATTRIBUTES;
      }
      else {
        continue;
      }
      rangesToHighlight.put(segmentOffset, attributesKey);
    }
    return rangesToHighlight;
  }
@NotNull
  private static Map<TextRange, TextAttributesKey> variableHighlights(@NotNull Template template, @NotNull TemplateState templateState)