Ejemplo n.º 1
0
 public static ValidationInfo validateNewServer(
     List<SonarQubeServer> otherServers, SonarQubeServer server, SonarQubeServerDialog dialog) {
   if (!SERVER_ID_PATTERN.matcher(server.getId()).matches()) {
     return new ValidationInfo(
         "Invalid server ID: " + server.getId() + ". Should match " + SERVER_ID_REGEXP,
         dialog.getIdTextField());
   }
   for (SonarQubeServer other : otherServers) {
     if (other.getId().equals(server.getId())) {
       return new ValidationInfo(
           SonarQubeBundle.message("sonarqube.settings.server.duplicateId", server.getId()),
           dialog.getUrlTextField());
     }
   }
   return validateServer(server, dialog);
 }
Ejemplo n.º 2
0
 @NotNull
 public String getPresentableName() {
   return SonarQubeBundle.message("sonarqube.settings");
 }