private static void saveState(TreeAction action, boolean state) {
   if (action instanceof PropertyOwner) {
     final String propertyName = ((PropertyOwner) action).getPropertyName();
     PropertiesComponent.getInstance()
         .setValue(getPropertyName(propertyName), Boolean.toString(state));
   }
 }
  private static boolean getDefaultValue(TreeAction action) {
    if (action instanceof PropertyOwner) {
      final String propertyName = ((PropertyOwner) action).getPropertyName();
      return PropertiesComponent.getInstance().getBoolean(getPropertyName(propertyName), false);
    }

    return false;
  }
  private JComponent createSouthPanel() {
    final JCheckBox checkBox = new JCheckBox(IdeBundle.message("checkbox.narrow.down.on.typing"));
    checkBox.setSelected(PropertiesComponent.getInstance().getBoolean(narrowDownPropertyKey, true));
    checkBox.addChangeListener(
        new ChangeListener() {
          public void stateChanged(ChangeEvent e) {
            myShouldNarrowDown = checkBox.isSelected();
            PropertiesComponent.getInstance()
                .setValue(narrowDownPropertyKey, Boolean.toString(myShouldNarrowDown));

            if (mySpeedSearch.isPopupActive()
                && !StringUtil.isEmpty(mySpeedSearch.getEnteredPrefix())) {
              myAbstractTreeBuilder.queueUpdate();
            }
          }
        });

    checkBox.setFocusable(false);
    UIUtil.applyStyle(UIUtil.ComponentStyle.MINI, checkBox);
    final JPanel panel = new JPanel(new BorderLayout());
    panel.add(checkBox, BorderLayout.WEST);
    return panel;
  }