private void setToComponent(final JComponent cmp, final boolean requestFocus) {
   myMatchingCountPanel.removeAll();
   myMatchingCountPanel.add(cmp, BorderLayout.CENTER);
   myMatchingCountPanel.revalidate();
   myMatchingCountPanel.repaint();
   if (requestFocus) {
     SwingUtilities.invokeLater(
         new Runnable() {
           public void run() {
             myPatternField.getTextField().requestFocusInWindow();
           }
         });
   }
 }
  private void updateTextFieldShowing() {
    myTextFieldAction.update();
    myNorthPanel.remove(myPathTextFieldWrapper);
    if (isToShowTextField()) {
      final ArrayList<VirtualFile> selection = new ArrayList<VirtualFile>();
      if (myFileSystemTree.getSelectedFile() != null) {
        selection.add(myFileSystemTree.getSelectedFile());
      }
      updatePathFromTree(selection, true);
      myNorthPanel.add(myPathTextFieldWrapper, BorderLayout.CENTER);
    } else {
      setErrorText(null);
    }
    myPathTextField.getField().requestFocus();

    myNorthPanel.revalidate();
    myNorthPanel.repaint();
  }