public void saveState(final PsiElement element, boolean isElementExpanded, final boolean isLeftPanel) {
    if (!myStateLoggingEnabled) {
      return;
    }
    if (myCurrentCommandIndex >=0 && myCurrentCommandIndex < myHistory.size() - 1) {
      myHistory.subList(myCurrentCommandIndex + 1, myHistory.size()).clear();
    }
    if (myHistory.size() == HISTORY_LIMIT) {
      myHistory.remove(0);
    }
    myHistory.add(new HistoryState(element, isElementExpanded, isLeftPanel));
    myCurrentCommandIndex = myHistory.size() - 1;
  }
public void saveState(final PsiElement element, boolean isElementExpanded, final boolean isLeftPanel)