@Override
  public void restoreLayout() {
    final RunnerContentUi[] children = myChildren.toArray(new RunnerContentUi[0]);
    final LinkedHashSet<Content> contents = new LinkedHashSet<>();
    Collections.addAll(contents, myManager.getContents());
    for (RunnerContentUi child : children) {
      Collections.addAll(contents, child.myManager.getContents());
    }
    for (AnAction action : myViewActions.getChildren(ActionManager.getInstance())) {
      if (!(action instanceof ViewLayoutModificationAction)) continue;
      contents.add(((ViewLayoutModificationAction)action).getContent());
    }
    Content[] all = contents.toArray(new Content[0]);
    Arrays.sort(all, Comparator.comparingInt(content -> getStateFor(content).getTab().getDefaultIndex()));

    setStateIsBeingRestored(true, this);
    try {
      for (RunnerContentUi child : children) {
        child.myManager.removeAllContents(false);
      }
      myManager.removeAllContents(false);
    }
    finally {
      setStateIsBeingRestored(false, this);
    }

    myLayoutSettings.resetToDefault();
    for (Content each : all) {
      myManager.addContent(each);
      CustomContentLayoutSettings customLayoutOptionsCollection = each.getUserData(CustomContentLayoutSettings.KEY);
      if (customLayoutOptionsCollection != null) {
       customLayoutOptionsCollection.restore();
      }
    }

    updateTabsUI(true);
  }
@Override
  public void restoreLayout()