public void syncWithModelChange() {
    //mouse may be under the expandable item, sub-popup would be shown,
    //this popup could grow/shrink making the sub-popup mispositioned,
    //while probability is not high, we just hide child popups
    disposeChildren();

    //noinspection unchecked,rawtypes
    MyBasePopupState<T> step = (MyBasePopupState)getStep();
    List<T> values = step.getValues();
    values.clear();
    values.addAll(copyItemsFromModel(myContext.getModel()));
    JList<?> popupList = getList();
    ((ListPopupModel<?>)popupList.getModel()).syncModel();

    //AbstractPopup#show sets preferred size, we need to turn if off shortly
    JComponent content = getContent();
    content.setPreferredSize(null);

    Dimension newSize = content.getPreferredSize();
    content.setPreferredSize(newSize);
    setSize(newSize);

    //this method makes the popup drift towards SW because of the myContent#insets
    moveToFitScreen();
  }
public void syncWithModelChange()