private void loadUIState() {
    final UIState uiState = UIState.getInstance();
    if (isFilterPanelVisible() != uiState.filtersVisible) {
      mySearchEditorPanel.setSecondComponent(uiState.filtersVisible ? myFilterPanel.getComponent() : null);
    }
    setExistingTemplatesPanelVisible(uiState.existingTemplatesVisible);
    myExistingTemplatesComponent.setTreeState(uiState.templatesTreeState);
    if (!myEditConfigOnly) {
      myPinned = uiState.pinned;
      myInjected.setSelected(uiState.searchInjectedCode);
      myMatchCase.setSelected(uiState.matchCase);
      if (uiState.scopeDescriptor != null && uiState.scopeType != null) {
        myScopePanel.setScope(Scopes.createScope(myProject, uiState.scopeDescriptor, uiState.scopeType));
      }
      myShortenFqn.setSelected(uiState.shortenFQNames);
      myStaticImport.setSelected(uiState.useStaticImport);
      myReformat.setSelected(uiState.reformat);
    }
  }
private void loadUIState()