protected void loadComponentState() {
   final String key = getComponentStateKey();
   final MasterDetailsStateService stateService = getStateService();
   if (key != null && stateService != null) {
     final MasterDetailsState state = stateService.getComponentState(key, myState.getClass());
     if (state != null) {
       loadState(state);
     }
   }
 }
 public void disposeUIResources() {
   myState.getProportions().saveSplitterProportions(myWholePanel);
   myAutoScrollHandler.cancelAllRequests();
   myDetails.disposeUIResources();
   myInitializedConfigurables.clear();
   clearChildren();
   final String key = getComponentStateKey();
   final MasterDetailsStateService stateService = getStateService();
   if (key != null && stateService != null) {
     stateService.setComponentState(key, getState());
   }
   myCurrentConfigurable = null;
 }
  public void reset() {
    loadComponentState();
    myHasDeletedItems = false;
    ((DefaultTreeModel) myTree.getModel()).reload();
    // myTree.requestFocus();
    myState.getProportions().restoreSplitterProportions(myWholePanel);

    final Enumeration enumeration = myRoot.breadthFirstEnumeration();
    boolean selected = false;
    while (enumeration.hasMoreElements()) {
      final MyNode node = (MyNode) enumeration.nextElement();
      if (node instanceof MyRootNode) continue;
      final String path = getNodePathString(node);
      if (!selected && Comparing.strEqual(path, myState.getLastEditedConfigurable())) {
        TreeUtil.selectInTree(node, false, myTree);
        selected = true;
      }
    }
    if (!selected) {
      TreeUtil.selectFirstNode(myTree);
    }
    updateSelectionFromTree();
  }
 protected void setSelectedNode(@Nullable MyNode node) {
   if (node != null) {
     myState.setLastEditedConfigurable(getNodePathString(node));
   }
   updateSelection(node != null ? node.getConfigurable() : null);
 }