Package org.eclipse.core.databinding

Examples of org.eclipse.core.databinding.UpdateValueStrategy$ValidatorRegistry


    WizardPageSupport.create(this, bindingContext);

    bindingContext.bindValue(SWTObservables.observeText(nameText, SWT.Modify),
        Observables.observeMapEntry(map, "name"), //$NON-NLS-1$
        new UpdateValueStrategy().setAfterConvertValidator(new StringValidator()), null);

    label = new Label(composite, SWT.NONE);
    label.setText(Messages.CloudFoundryServicePlanWizardPage_LABEL_TYPE);

    typeCombo = new Combo(composite, SWT.READ_ONLY | SWT.BORDER);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(typeCombo);
    typeCombo.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        int index = typeCombo.getSelectionIndex();
        if (index != -1) {
          CloudServiceOffering configuration = serviceOfferings.get(index);
          setCloudService(service, configuration);
        }
        refreshPlan();
      }
    });

    bindingContext.bindValue(SWTObservables.observeSelection(typeCombo), Observables.observeMapEntry(map, "type"), //$NON-NLS-1$
        new UpdateValueStrategy().setAfterConvertValidator(new ComboValidator(Messages.CloudFoundryServicePlanWizardPage_TEXT_SELECT_TYPE)), null);

    pageBook = new PageBook(composite, SWT.NONE);
    GridDataFactory.fillDefaults().grab(true, true).span(2, 1).applyTo(pageBook);

    planGroup = new Group(pageBook, SWT.BORDER);
View Full Code Here


    // add WizardPage validators
    DataBindingContext dbc = new DataBindingContext();
    WizardPageSupport.create(this, dbc);
    dbc.bindValue(SWTObservables.observeText(nameText, SWT.Modify),
        nameValue, new UpdateValueStrategy()
            .setBeforeSetValidator(new FilterNameValidator()), null);
    dbc.bindValue(SWTObservables.observeText(queryText, SWT.Modify),
        queryValue, new UpdateValueStrategy()
            .setBeforeSetValidator(new JSONValidator()), null);

    setControl(container);
    // disable save until everything matches
    setPageComplete(false);
View Full Code Here

    // add WizardPage validators
    DataBindingContext dbc = new DataBindingContext();
    WizardPageSupport.create(this, dbc);

    dbc.bindValue(SWTObservables.observeText(connName, SWT.Modify),
        nameValue, new UpdateValueStrategy()
            .setBeforeSetValidator(new NameValidator()), null);
    dbc.bindValue(SWTObservables.observeText(host, SWT.Modify), hostValue,
        new UpdateValueStrategy()
            .setBeforeSetValidator(new HostNameValidator()), null);
    dbc.bindValue(SWTObservables.observeText(port, SWT.Modify), portValue,
        new UpdateValueStrategy()
            .setBeforeSetValidator(new PortValidator()), null);

    initialize();
    setControl(container);
    // disable Save until everything matches
View Full Code Here

  protected DataBindingContext initDataBindings() {
    DataBindingContext bindingContext = new DataBindingContext();
    //
    IObservableValue nameTextObserveTextObserveWidget = SWTObservables.observeText(nameText, SWT.Modify);
    IObservableValue attributeNameObserveValue = BeansObservables.observeValue(attribute, "toolName");
    UpdateValueStrategy strategy = new UpdateValueStrategy();
    if (this.attribute instanceof ToolWindowAttribute){
      strategy.setAfterConvertValidator(new ToolNameValidatorWithBrackets(nameText));
    } else {
      strategy.setAfterConvertValidator(new ToolNameValidator(nameText));
    }
    bindingContext.bindValue(nameTextObserveTextObserveWidget, attributeNameObserveValue, strategy, null);
    //
    IObservableValue typeTextObserveTextObserveWidget = SWTObservables.observeText(typeText, SWT.Modify);
    IObservableValue attributeTypeObserveValue = BeansObservables.observeValue(attribute, "type");
View Full Code Here

  protected DataBindingContext initDataBindings() {
    DataBindingContext bindingContext = new DataBindingContext();
    //
    IObservableValue textObserveTextObserveWidget = SWTObservables.observeText(text, SWT.Modify);
    IObservableValue eventNameObserveValue = BeansObservables.observeValue(event, "toolName");
    UpdateValueStrategy strategy = new UpdateValueStrategy();
    strategy.setAfterConvertValidator(new ToolNameValidator(text));
    bindingContext.bindValue(textObserveTextObserveWidget, eventNameObserveValue, strategy, null);
    //
    IObservableValue buttonObserveSelectionObserveWidget = SWTObservables.observeSelection(button);
    IObservableValue eventPublicObserveValue = BeansObservables.observeValue(event, "public");
    bindingContext.bindValue(buttonObserveSelectionObserveWidget, eventPublicObserveValue, null, null);
View Full Code Here

    IObservableValue soLoadBalanceObserveValue = BeansObservables.observeValue(so, "loadBalance");
    bindingContext.bindValue(btnLoadBalancedObserveSelectionObserveWidget, soLoadBalanceObserveValue, null, null);
    //
    IObservableValue soNameTextObserveTextObserveWidget = SWTObservables.observeText(soNameText, SWT.Modify);
    IObservableValue soToolNameObserveValue = BeansObservables.observeValue(so, "toolName");
    UpdateValueStrategy strategy = new UpdateValueStrategy();
    strategy.setAfterConvertValidator(new ToolNameValidator(soNameText));
    bindingContext.bindValue(soNameTextObserveTextObserveWidget, soToolNameObserveValue, strategy, null);
    //
    IObservableValue searchPathTextObserveTextObserveWidget = SWTObservables.observeText(searchPathText, SWT.Modify);
    IObservableValue soSearchPathObserveValue = BeansObservables.observeValue(so, "searchPath");
    bindingContext.bindValue(searchPathTextObserveTextObserveWidget, soSearchPathObserveValue, null, null);
View Full Code Here

    IObservableValue virtualAttributeSetExpressionObserveValue = BeansObservables.observeValue(virtualAttribute, "setExpression");
    bindingContext.bindValue(textObserveTextObserveWidget, virtualAttributeSetExpressionObserveValue, null, null);
    //
    IObservableValue nameTextObserveTextObserveWidget = SWTObservables.observeText(nameText, SWT.Modify);
    IObservableValue virtualAttributeNameObserveValue = BeansObservables.observeValue(virtualAttribute, "toolName");
    UpdateValueStrategy strategy = new UpdateValueStrategy();
    strategy.setAfterConvertValidator(new ToolNameValidator(nameText));
    bindingContext.bindValue(nameTextObserveTextObserveWidget, virtualAttributeNameObserveValue, strategy, null);
    //
    return bindingContext;
  }
View Full Code Here

  protected DataBindingContext initDataBindings() {
    DataBindingContext bindingContext = new DataBindingContext();
    //
    IObservableValue classNameTextObserveTextObserveWidget = SWTObservables.observeText(classNameText, SWT.Modify);
    IObservableValue cdfNameObserveValue = BeansObservables.observeValue(cdf, "toolName");
    UpdateValueStrategy strategy = new UpdateValueStrategy();
    strategy.setAfterConvertValidator(new ToolNameValidator(classNameText));
    bindingContext.bindValue(classNameTextObserveTextObserveWidget, cdfNameObserveValue, strategy, null);
    //
    IObservableValue superClassTextObserveTextObserveWidget = SWTObservables.observeText(superClassText, SWT.FocusOut);
    IObservableValue cdfSuperClassObserveValue = BeansObservables.observeValue(cdf, "superClass");
    bindingContext.bindValue(superClassTextObserveTextObserveWidget, cdfSuperClassObserveValue, null, null);
View Full Code Here

  protected DataBindingContext initDataBindings() {
    DataBindingContext bindingContext = new DataBindingContext();
    //
    IObservableValue nameTextObserveTextObserveWidget = SWTObservables.observeText(nameText, SWT.Modify);
    IObservableValue methodNameObserveValue = BeansObservables.observeValue(method, "name");
    UpdateValueStrategy strategy = new UpdateValueStrategy();
    strategy.setAfterConvertValidator(new ToolNameValidator(this.nameText));
    bindingContext.bindValue(nameTextObserveTextObserveWidget, methodNameObserveValue, strategy, null);
    //
    IObservableValue returnTypeTextObserveTextObserveWidget = SWTObservables.observeText(returnTypeText, SWT.Modify);
    IObservableValue methodReturnTypeObserveValue = BeansObservables.observeValue(method, "returnType");
    bindingContext.bindValue(returnTypeTextObserveTextObserveWidget, methodReturnTypeObserveValue, null, null);
    //
    IObservableValue publicCheckButtonObserveSelectionObserveWidget = SWTObservables.observeSelection(publicCheckButton);
    IObservableValue methodPublicObserveValue = BeansObservables.observeValue(method, "public");
    bindingContext.bindValue(publicCheckButtonObserveSelectionObserveWidget, methodPublicObserveValue, null, null);
    //
    IObservableValue btnCheckButtonObserveSelectionObserveWidget = SWTObservables.observeSelection(btnCheckButton);
    IObservableValue methodCopyReturnObserveValue = BeansObservables.observeValue(method, "copyReturn");
    bindingContext.bindValue(btnCheckButtonObserveSelectionObserveWidget, methodCopyReturnObserveValue, null, null);
    //
    IObservableValue returnEventTextObserveTextObserveWidget = SWTObservables.observeText(returnEventText, SWT.Modify);
    IObservableValue methodReturnEventObserveValue = BeansObservables.observeValue(method, "returnEvent");
    UpdateValueStrategy strategy_2 = new UpdateValueStrategy();
    strategy_2.setAfterConvertValidator(new ToolNameAllowBlankValidator(returnEventText));
    bindingContext.bindValue(returnEventTextObserveTextObserveWidget, methodReturnEventObserveValue, strategy_2, null);
    //
    IObservableValue exceptionEventTextObserveTextObserveWidget = SWTObservables.observeText(exceptionEventText, SWT.Modify);
    IObservableValue methodExceptionEventObserveValue = BeansObservables.observeValue(method, "exceptionEvent");
    UpdateValueStrategy strategy_3 = new UpdateValueStrategy();
    strategy_3.setAfterConvertValidator(new ToolNameAllowBlankValidator(exceptionEventText));
    bindingContext.bindValue(exceptionEventTextObserveTextObserveWidget, methodExceptionEventObserveValue, strategy_3, null);
    //
    //
    ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
    tableViewer.setContentProvider(listContentProvider);
View Full Code Here

  protected DataBindingContext initDataBindings() {
    DataBindingContext bindingContext = new DataBindingContext();
    //
    IObservableValue textObserveTextObserveWidget = SWTObservables.observeText(nameText, SWT.Modify);
    IObservableValue constantNameObserveValue = BeansObservables.observeValue(constant, "toolName");
    UpdateValueStrategy strategy = new UpdateValueStrategy();
    strategy.setAfterConvertValidator(new ToolNameValidator(nameText));
    bindingContext.bindValue(textObserveTextObserveWidget, constantNameObserveValue, strategy, null);
    //
    IObservableValue text_1ObserveTextObserveWidget = SWTObservables.observeText(valueText, SWT.Modify);
    IObservableValue constantValueObserveValue = BeansObservables.observeValue(constant, "value");
    bindingContext.bindValue(text_1ObserveTextObserveWidget, constantValueObserveValue, null, null);
View Full Code Here

TOP

Related Classes of org.eclipse.core.databinding.UpdateValueStrategy$ValidatorRegistry

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.