Package com.intellij.openapi.ui

Examples of com.intellij.openapi.ui.ValidationInfo


    protected ValidationInfo doValidate() {
        String message = "Please fill all branch names and prefixes";

        if(useNonDefaultConfiguration()) {
            if(productionBranchComboBox.getSelectedItem().equals(developmentBranchComboBox.getSelectedItem())) {
                return new ValidationInfo("Production and development branch must be distinct branches", developmentBranchComboBox);
            }
            if (StringUtil.isEmptyOrSpaces(featurePrefixTextField.getText())) {
                return new ValidationInfo(message, featurePrefixTextField);
            }
            if (StringUtil.isEmptyOrSpaces(releasePrefixTextField.getText())) {
                return new ValidationInfo(message, releasePrefixTextField);
            }
            if (StringUtil.isEmptyOrSpaces(hotfixPrefixTextField.getText())) {
                return new ValidationInfo(message, hotfixPrefixTextField);
            }
            if (StringUtil.isEmptyOrSpaces(supportPrefixTextField.getText())) {
                return new ValidationInfo(message, supportPrefixTextField);
            }
        }

        return null;
    }
View Full Code Here


  @Nullable
  @Override
  protected ValidationInfo doValidate() {
    if (!StringUtil.isJavaIdentifier(getFunctionName())) {
      return new ValidationInfo("Not a valid name!", myFunctionNameField);
    }
    return super.doValidate();
  }
View Full Code Here

    @Nullable
    @Override
    protected ValidationInfo doValidate() {
        String keyName = getKey();
        if (StringUtils.isBlank(keyName)) {
            return new ValidationInfo("Key name is not set");
        }

        if (mongoEditionPanel.containsKey(keyName)) {
            return new ValidationInfo(String.format("Key '%s' is already used", keyName));
        }

        JsonDataType dataType = getJsonDataType();
        if (JsonDataType.NULL.equals(dataType)) {
            return null;
        }

        String value = getValue();
        if (StringUtils.isEmpty(value)) {
            return new ValidationInfo("Key value is not set");
        }

        try {
            MongoUtils.parseValue(dataType, value);
        } catch (Exception ex) {
            return new ValidationInfo(ex.getMessage());
        }

        return null;
    }
View Full Code Here

            return null;
        }

        String value = getValue();
        if (StringUtils.isEmpty(value)) {
            return new ValidationInfo("Value is not set");
        }

        try {
            MongoUtils.parseValue(dataType, value);
        } catch (Exception ex) {
            return new ValidationInfo(ex.getMessage());
        }

        return null;
    }
View Full Code Here

  @Nullable
  @Override
  protected ValidationInfo doValidate() {
    if (StringUtils.isEmpty(nameTextField.getText().trim())) {
      return new ValidationInfo("Please select a name for your theme.", nameTextField);
    }

    if (StringUtils.isEmpty(resPathTextField.getText().trim())) {
      return new ValidationInfo("Please select res folder in order to unzip the holo colors archive.", resPathTextField);
    }

    if (StringUtils.isEmpty(colorTextField.getText().trim())) {
      return new ValidationInfo("Please select a valid color.", colorTextField);
    }

    return null;
  }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.ui.ValidationInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.