private static String promptNewKeyName(final Project project, final PropertiesFile propFile, final String key) {
    String newName;
    int index = 0;
    do {
      index++;
      newName = key + index;
    } while(propFile.findPropertyByKey(newName) != null);

    InputValidator validator = new InputValidator() {
      @Override
      public boolean checkInput(String inputString) {
        return !inputString.isEmpty() && propFile.findPropertyByKey(inputString) == null;
      }

      @Override
      public boolean canClose(String inputString) {
        return checkInput(inputString);
      }
    };
    return Messages.showInputDialog(project, UIDesignerBundle.message("edit.text.unique.key.prompt"),
                                    UIDesignerBundle.message("edit.text.multiple.usages.title"),
                                    Messages.getQuestionIcon(), newName, validator);
  }
private static String promptNewKeyName(final Project project, final PropertiesFile propFile, final String key)