Package org.netbeans.modules.php.nette.validators

Examples of org.netbeans.modules.php.nette.validators.Validable.validate()


      if (!classNameValidator.validate(getFormClass())) {
        errorLabel.setIcon(errorIcon);
        setWarningText(NbBundle.getMessage(CreateComponentGeneratorPanel.class, "ERR_head_form_class"));
       
        dd.setValid(false);
      } else if (!componentNameValidator.validate(getFormName())) {
        errorLabel.setIcon(errorIcon);
        setWarningText(NbBundle.getMessage(CreateComponentGeneratorPanel.class, "ERR_head_form_name"));

        dd.setValid(false);
      } else {
View Full Code Here


      if (!classNameValidator.validate(getComponentClass())) {
        errorLabel.setIcon(errorIcon);
        setWarningText(NbBundle.getMessage(CreateComponentGeneratorPanel.class, "ERR_head_component_class"));

        dd.setValid(false);
      } else if (!componentNameValidator.validate(getComponentName())) {
        errorLabel.setIcon(errorIcon);
        setWarningText(NbBundle.getMessage(CreateComponentGeneratorPanel.class, "ERR_head_component_name"));

        dd.setValid(false);
      } else {
View Full Code Here

  public String getErrorMessage() {
    if (copyNetteCheckbox.isSelected()) {
      Validable emptyPathValidator = new NetteEmptyPathValidator();

      if (emptyPathValidator.validate(NetteOptions.getInstance().getNetteFile())) {
        return NbBundle.getMessage(NewNetteProjectPanel.class, "ERR_no_nette_file");
      }

      Validable loaderPathValidator = new NetteLoaderExistsValidator();
View Full Code Here

        return NbBundle.getMessage(NewNetteProjectPanel.class, "ERR_no_nette_file");
      }

      Validable loaderPathValidator = new NetteLoaderExistsValidator();

      if (!loaderPathValidator.validate(NetteOptions.getInstance().getNetteFile())) {
        return NbBundle.getMessage(NewNetteProjectPanel.class, "ERR_nette_file_not_exists");
      }
    }

    return null;
View Full Code Here

    if (!isNetteFileValid()) {
      errorLabel.setIcon(errorIcon);
      errorLabel.setText(NbBundle.getMessage(NettePanel.class, "ERR_invalid_nette_file"));

      return false;
    } else if (!sandboxPathValidator.validate(sandboxPathTextField.getText())) {
      errorLabel.setIcon(errorIcon);
      errorLabel.setText(NbBundle.getMessage(NettePanel.class, "ERR_invalid_sandbox_folder"));

      return false;
    } else {
View Full Code Here

  private boolean isNetteFileValid() {
    Validable loaderExistsValidator = new NetteLoaderExistsValidator();
    Validable emptyPathValidator = new NetteEmptyPathValidator();

    return loaderExistsValidator.validate(netteFileTextField.getText()) || emptyPathValidator.validate(netteFileTextField.getText());
  }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel errorLabel;
    private javax.swing.JLabel jLabel1;
View Full Code Here

  private boolean isValidSandboxPath() {
    Validable sandboxPathValidator = new SandboxPathValidator();
    String sandboxPath = NetteOptions.getInstance().getSandboxPath();

    return sandboxPathValidator.validate(sandboxPath) && !sandboxPath.trim().isEmpty();
  }

  private void createDefaultDirectoryStructure() throws IOException {
    createDocumentRoot();
    createApp();
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.