@NotNull
  @Override
  protected List<ValidationInfo> doValidateAll() {
    String patternString = myPatternStringField.getText().trim();
    if (patternString.isEmpty()) {
      return Collections.singletonList(new ValidationInfo(IdeBundle.message("error.pattern.should.be.specified"), myPatternStringField));
    }
    for (int i = 0; i < myExistingPatterns.size(); i++) {
      TodoPattern pattern = myExistingPatterns.get(i);
      if (myPatternIndex != i && patternString.equals(pattern.getPatternString())) {
        return Collections.singletonList(new ValidationInfo(IdeBundle.message("error.same.pattern.already.exists"), myPatternStringField));
      }
    }
    return super.doValidateAll();
  }
@NotNull
  @Override
  protected List<ValidationInfo> doValidateAll()