Package org.eclipse.core.databinding

Examples of org.eclipse.core.databinding.ValidationStatusProvider


    statusProviderChanged();
    dbc.getValidationStatusProviders().addListChangeListener(
        validationStatusProvidersListener);
    for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
        .hasNext();) {
      ValidationStatusProvider validationStatusProvider = (ValidationStatusProvider) it
          .next();
      IObservableList targets = validationStatusProvider.getTargets();
      targets
          .addListChangeListener(validationStatusProviderTargetsListener);
      for (Iterator iter = targets.iterator(); iter.hasNext();) {
        ((IObservable) iter.next()).addChangeListener(uiChangeListener);
      }
View Full Code Here


    }
    dbc.getValidationStatusProviders().removeListChangeListener(
        validationStatusProvidersListener);
    for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
        .hasNext();) {
      ValidationStatusProvider validationStatusProvider = (ValidationStatusProvider) it
          .next();
      IObservableList targets = validationStatusProvider.getTargets();
      targets
          .removeListChangeListener(validationStatusProviderTargetsListener);
      for (Iterator iter = targets.iterator(); iter.hasNext();) {
        ((IObservable) iter.next())
            .removeChangeListener(uiChangeListener);
View Full Code Here

    if (aggregateStatusProvider != null)
      aggregateStatusProvider.dispose();
    if (dbc != null && !uiChanged) {
      for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
          .hasNext();) {
        ValidationStatusProvider validationStatusProvider = (ValidationStatusProvider) it
            .next();
        IObservableList targets = validationStatusProvider.getTargets();
        targets
            .removeListChangeListener(validationStatusProviderTargetsListener);
        for (Iterator iter = targets.iterator(); iter.hasNext();) {
          ((IObservable) iter.next())
              .removeChangeListener(uiChangeListener);
View Full Code Here

    this.validationStatusProviders = dbc.getValidationStatusProviders();
  }

  protected Object calculate() {
    int maxSeverity = IStatus.OK;
    ValidationStatusProvider maxSeverityProvider = null;
    for (Iterator it = validationStatusProviders.iterator(); it.hasNext();) {
      ValidationStatusProvider provider = (ValidationStatusProvider) it
          .next();
      IStatus status = (IStatus) provider.getValidationStatus()
          .getValue();
      if (status.getSeverity() > maxSeverity) {
        maxSeverity = status.getSeverity();
        maxSeverityProvider = provider;
      }
View Full Code Here

    statusProviderChanged();
    dbc.getValidationStatusProviders().addListChangeListener(
        validationStatusProvidersListener);
    for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
        .hasNext();) {
      ValidationStatusProvider validationStatusProvider = (ValidationStatusProvider) it
          .next();
      IObservableList targets = validationStatusProvider.getTargets();
      targets
          .addListChangeListener(validationStatusProviderTargetsListener);
      for (Iterator iter = targets.iterator(); iter.hasNext();) {
        ((IObservable) iter.next()).addChangeListener(uiChangeListener);
      }
View Full Code Here

    }
    dbc.getValidationStatusProviders().removeListChangeListener(
        validationStatusProvidersListener);
    for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
        .hasNext();) {
      ValidationStatusProvider validationStatusProvider = (ValidationStatusProvider) it
          .next();
      IObservableList targets = validationStatusProvider.getTargets();
      targets
          .removeListChangeListener(validationStatusProviderTargetsListener);
      for (Iterator iter = targets.iterator(); iter.hasNext();) {
        ((IObservable) iter.next())
            .removeChangeListener(uiChangeListener);
View Full Code Here

    if (aggregateStatusProvider != null)
      aggregateStatusProvider.dispose();
    if (dbc != null && !uiChanged) {
      for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
          .hasNext();) {
        ValidationStatusProvider validationStatusProvider = (ValidationStatusProvider) it
            .next();
        IObservableList targets = validationStatusProvider.getTargets();
        targets
            .removeListChangeListener(validationStatusProviderTargetsListener);
        for (Iterator iter = targets.iterator(); iter.hasNext();) {
          ((IObservable) iter.next())
              .removeChangeListener(uiChangeListener);
View Full Code Here

  public static boolean isValid(DataBindingContext context) {
    IObservableList validationStatusProviders = context.getValidationStatusProviders();
    for (Object object : validationStatusProviders) {
      if (object instanceof ValidationStatusProvider) {
        ValidationStatusProvider provider = (ValidationStatusProvider) object;
        IObservableValue validationStatus = provider.getValidationStatus();
        if (validationStatus != null) {
          Object value = validationStatus.getValue();
          if (value instanceof BindingStatus) {
            BindingStatus status = (BindingStatus) value;
            if (!status.isOK()) {
View Full Code Here

TOP

Related Classes of org.eclipse.core.databinding.ValidationStatusProvider

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.