private void setSegment(RangeMarker marker) {
    if (myRangeToPrint != null) {
      ReadAction.run(() -> myRangeToPrint.dispose());
    }
    myRangeToPrint = marker;
  }
private void setSegment(RangeMarker marker)