Package org.eclipse.php.internal.ui.util

Examples of org.eclipse.php.internal.ui.util.StatusInfo


  private Group removeWhitespacesGroup;

  public SaveActionsConfigurationBlock(IStatusChangeListener context,
      IProject project, IWorkbenchPreferenceContainer container) {
    super(context, project, getKeys(), container);
    fSaveActionsStatus = new StatusInfo();
  }
View Full Code Here


  @Override
  protected void validateSettings(Key changedKey, String oldValue,
      String newValue) {
    if (changedKey != null) {
    } else {
      fSaveActionsStatus = new StatusInfo();
    }

    fContext.statusChanged(fSaveActionsStatus);
  }
View Full Code Here

  public void setVisible(boolean visible) {
    super.setVisible(visible);
    fPageVisible = visible;
    // policy: wizards are not allowed to come up with an error message
    if (visible && fCurrStatus.matches(IStatus.ERROR)) {
      StatusInfo status = new StatusInfo();
      status.setError(""); //$NON-NLS-1$
      fCurrStatus = status;
    }
    updateStatus(fCurrStatus);
  }
View Full Code Here

  public PHPFormatterConfigurationBlock(IStatusChangeListener context,
      IProject project, IWorkbenchPreferenceContainer container) {
    super(context, project, getKeys(), container);

    fFormatterStatus = new StatusInfo();
  }
View Full Code Here

      if (PREF_FORMATTER_INDENTATION_SIZE.equals(changedKey)) {
        try {
          fIndentationSize = Integer.valueOf(newValue);
          if (fIndentationSize < MIN_INDENT_SIZE
              || fIndentationSize > MAX_INDENT_SIZE) {
            fFormatterStatus = new StatusInfo(
                IStatus.ERROR,
                PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
          } else {
            setValue(PREF_FORMATTER_INDENTATION_SIZE,
                String.valueOf(fIndentationSize));
            fFormatterStatus = new StatusInfo();
          }
        } catch (NumberFormatException nfe) {
          fFormatterStatus = new StatusInfo(
              IStatus.ERROR,
              PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
        }
      }
      if (PREF_FORMATTER_TAB_SIZE.equals(changedKey)) {
        try {
          fTabSize = Integer.valueOf(newValue);
          if (fTabSize < MIN_INDENT_SIZE
              || fTabSize > MAX_INDENT_SIZE) {
            fFormatterStatus = new StatusInfo(
                IStatus.ERROR,
                PHPUIMessages.PHPFormatterConfigurationBlock_tabSizeErrorMessage);
          } else {
            setValue(PREF_FORMATTER_TAB_SIZE,
                String.valueOf(fTabSize));
            fFormatterStatus = new StatusInfo();
          }
        } catch (NumberFormatException nfe) {
          fFormatterStatus = new StatusInfo(
              IStatus.ERROR,
              PHPUIMessages.PHPFormatterConfigurationBlock_tabSizeErrorMessage);
        }
      }
      if (PREF_FORMATTER_INDENTATION_WRAPPED_LINE_SIZE.equals(changedKey)) {
        try {
          fIndentationWrappedLineSize = Integer.valueOf(newValue);
          if (fIndentationWrappedLineSize < MIN_INDENT_SIZE
              || fIndentationWrappedLineSize > MAX_INDENT_SIZE) {
            fFormatterStatus = new StatusInfo(
                IStatus.ERROR,
                PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
          } else {
            setValue(PREF_FORMATTER_INDENTATION_WRAPPED_LINE_SIZE,
                String.valueOf(fIndentationWrappedLineSize));
            fFormatterStatus = new StatusInfo();
          }
        } catch (NumberFormatException nfe) {
          fFormatterStatus = new StatusInfo(
              IStatus.ERROR,
              PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
        }
      }
      if (PREF_FORMATTER_INDENTATION_ARRAY_INIT_SIZE.equals(changedKey)) {
        try {
          fIndentationArrayInitSize = Integer.valueOf(newValue);
          if (fIndentationArrayInitSize < MIN_INDENT_SIZE
              || fIndentationArrayInitSize > MAX_INDENT_SIZE) {
            fFormatterStatus = new StatusInfo(
                IStatus.ERROR,
                PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
          } else {
            setValue(PREF_FORMATTER_INDENTATION_ARRAY_INIT_SIZE,
                String.valueOf(fIndentationArrayInitSize));
            fFormatterStatus = new StatusInfo();
          }
        } catch (NumberFormatException nfe) {
          fFormatterStatus = new StatusInfo(
              IStatus.ERROR,
              PHPUIMessages.PHPFormatterConfigurationBlock_indentSizeErrorMessage);
        }
      } else {
        return;
      }
    } else {
      fFormatterStatus = new StatusInfo();
    }

    fContext.statusChanged(fFormatterStatus);

  }
View Full Code Here

    }

    public IStatus validate(Object[] selection) {
      int nSelected = selection.length;
      if (nSelected == 0 || (nSelected > 1 && !fMultiSelect)) {
        return new StatusInfo(IStatus.ERROR, ""); //$NON-NLS-1$
      }
      for (int i = 0; i < selection.length; i++) {
        Object curr = selection[i];
        if (curr instanceof File) {
          File file = (File) curr;
          if (!fAcceptFolders && !file.isFile()) {
            return new StatusInfo(IStatus.ERROR, ""); //$NON-NLS-1$
          }
        }
      }
      return new StatusInfo();
    }
View Full Code Here

    applyDialogFont(composite);
    return composite;
  }

  private void doValidation() {
    StatusInfo status = new StatusInfo();
    String newText = fNameDialogField.getText();
    if (newText.length() == 0) {
      status.setError(PHPUIMessages.TodoTaskInputDialog_error_enterName);
    } else {
      if (newText.indexOf(',') != -1) {
        status.setError(PHPUIMessages.TodoTaskInputDialog_error_comma);
      } else if (fExistingNames.contains(newText)) {
        status.setError(PHPUIMessages.TodoTaskInputDialog_error_entryExists);
      } else if (Character.isWhitespace(newText.charAt(0))
          || Character.isWhitespace(newText
              .charAt(newText.length() - 1))) {
        status.setError(PHPUIMessages.TodoTaskInputDialog_error_noSpace);
      }
    }
    updateStatus(status);
  }
View Full Code Here

    while (iter.hasNext()) {
      SelectionListener listener = (SelectionListener) iter.next();
      listener.widgetSelected(null);
    }

    updateStatus(new StatusInfo());
  }
View Full Code Here

    } else {
      fPHPManualButtonsList.enableButton(IDX_EDIT, false);
      fPHPManualButtonsList.enableButton(IDX_DEFAULT, false);
    }

    fPHPManualStatus = new StatusInfo();

    GridLayout layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    layout.numColumns = 2;
View Full Code Here

    } else {
      fTodoTasksList.enableButton(IDX_EDIT, false);
      fTodoTasksList.enableButton(IDX_DEFAULT, false);
    }

    fTaskTagsStatus = new StatusInfo();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.ui.util.StatusInfo

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.