private void updateControls() {
   final boolean isNameOK = myValidator.checkName(myNameField.getText());
   getOKAction().setEnabled(isNameOK);
   if (isNameOK) {
     final String text = myValueField.getText().trim();
     getOKAction().setEnabled(text.length() > 0 && !"/".equals(text.trim()));
   }
 }
 protected void doOKAction() {
   if (!myValidator.isOK(getName(), getValue())) return;
   super.doOKAction();
 }