@Nullable public Dimension adjust(@NotNull Dimension newPreferredSize,@Nullable Dimension oldPreferredSize,@NotNull EditorImpl editor){
  if (oldPreferredSize == null || mySkip) {
    return newPreferredSize;
  }
  if (newPreferredSize.height != oldPreferredSize.height) {
    return newPreferredSize;
  }
  stripTimings();
  myTimings.add(System.currentTimeMillis());
  if (myTimings.size() < FREQUENT_SIZE_CHANGES_NUMBER) {
    return newPreferredSize;
  }
  boolean increaseWidth=newPreferredSize.width > oldPreferredSize.width;
  Dimension result;
  if (increaseWidth) {
    final int spaceWidth=EditorUtil.getSpaceWidth(Font.PLAIN,editor);
    newPreferredSize.width+=myReserveColumns * spaceWidth;
    myReserveColumns+=3;
    result=newPreferredSize;
  }
 else {
    result=oldPreferredSize;
  }
  scheduleSizeUpdate(editor);
  return result;
}

@ Nullable public Dimension adjust ( @ NotNull Dimension newPreferredSize , @ Nullable Dimension oldPreferredSize , @ NotNull EditorImpl editor ) { if ( oldPreferredSize == null || mySkip ) { return newPreferredSize ; } if ( newPreferredSize . height != oldPreferredSize . height ) { return newPreferredSize ; } stripTimings ( ) ; myTimings . add ( System . currentTimeMillis ( ) ) ; if ( myTimings . size ( ) < FREQUENT_SIZE_CHANGES_NUMBER ) { return newPreferredSize ; } boolean increaseWidth = newPreferredSize . width > oldPreferredSize . width ; Dimension result ; if ( increaseWidth ) { final int spaceWidth = EditorUtil . getSpaceWidth ( Font . PLAIN , editor ) ; newPreferredSize . width += myReserveColumns * spaceWidth ; myReserveColumns += 3 ; result = newPreferredSize ; } else { result = oldPreferredSize ; } scheduleSizeUpdate ( editor ) ; return result ; }
asks to adjust new preferred size appliance if necessary .
