Examples of ValidationInfo


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

Examples of com.intellij.openapi.ui.ValidationInfo

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

Examples of com.intellij.openapi.ui.ValidationInfo

    @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

Examples of com.intellij.openapi.ui.ValidationInfo

            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

Examples of com.intellij.openapi.ui.ValidationInfo

  @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

Examples of org.apache.cayenne.project.validator.ValidationInfo

        problemsTable.setModel(new ValidatorTableModel());
    }

    private void showFailedObject() {
        if (problemsTable.getSelectedRow() >= 0) {
            ValidationInfo obj = (ValidationInfo) problemsTable.getModel().getValueAt(
                    problemsTable.getSelectedRow(),
                    0);
            ValidationDisplayHandler.getErrorMsg(obj).displayField(
                    getMediator(),
                    super.getParentEditor());
View Full Code Here

Examples of org.apache.cayenne.project.validator.ValidationInfo

                int row,
                int column) {

            boolean error = false;
            if (value != null) {
                ValidationInfo info = (ValidationInfo) value;
                error = info.getSeverity() == ValidationInfo.ERROR;
                value = (error) ? "Error: " + info.getMessage() : "Warning: "
                        + info.getMessage();
            }

            setBackground(error ? ERROR_COLOR : WARNING_COLOR);
            return super.getTableCellRendererComponent(
                    table,
View Full Code Here

Examples of org.apache.cayenne.project.validator.ValidationInfo

        int validationCode = validator.validate();
        if (validationCode >= ValidationDisplayHandler.WARNING) {

            Iterator it = validator.validationResults().iterator();
            while (it.hasNext()) {
                ValidationInfo nextProblem = (ValidationInfo) it.next();
                Entity failedEntity = null;

                if (nextProblem.getValidatedObject() instanceof DbAttribute) {
                    DbAttribute failedAttribute = (DbAttribute) nextProblem
                            .getValidatedObject();
                    failedEntity = failedAttribute.getEntity();
                }
                else if (nextProblem.getValidatedObject() instanceof DbRelationship) {
                    DbRelationship failedRelationship = (DbRelationship) nextProblem
                            .getValidatedObject();
                    failedEntity = failedRelationship.getSourceEntity();
                }
                else if (nextProblem.getValidatedObject() instanceof DbEntity) {
                    failedEntity = (Entity) nextProblem.getValidatedObject();
                }

                if (failedEntity == null) {
                    continue;
                }

                excludedTables.put(failedEntity.getName(), failedEntity);
                validationMessages.put(failedEntity.getName(), nextProblem.getMessage());
            }
        }

        // now do a pass through the tables and exclude derived
        Iterator tablesIt = tables.iterator();
View Full Code Here

Examples of org.apache.cayenne.project.validator.ValidationInfo

        problemsTable.setModel(new ValidatorTableModel());
    }

    private void showFailedObject() {
        if (problemsTable.getSelectedRow() >= 0) {
            ValidationInfo obj = (ValidationInfo) problemsTable.getModel().getValueAt(
                    problemsTable.getSelectedRow(),
                    0);
            ValidationDisplayHandler.getErrorMsg(obj).displayField(
                    getMediator(),
                    super.getParentEditor());
View Full Code Here

Examples of org.apache.cayenne.project.validator.ValidationInfo

                int row,
                int column) {

            boolean error = false;
            if (value != null) {
                ValidationInfo info = (ValidationInfo) value;
                error = info.getSeverity() == ValidationInfo.ERROR;
                value = (error) ? "Error: " + info.getMessage() : "Warning: "
                        + info.getMessage();
            }

            setBackground(error ? ERROR_COLOR : WARNING_COLOR);
            return super.getTableCellRendererComponent(
                    table,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.