Package org.eclipse.core.databinding

Examples of org.eclipse.core.databinding.DataBindingContext


    section.pack();
  }
 
  protected DataBindingContext initDataBindings() {
    DataBindingContext bindingContext = new DataBindingContext();
    //
    IObservableValue btnNostoreObserveSelectionObserveWidget = SWTObservables.observeSelection(btnNostore);
    IObservableValue parametersStoreMessagesObserveValue = BeansObservables.observeValue(parameters, "storeMessages");
    bindingContext.bindValue(btnNostoreObserveSelectionObserveWidget, parametersStoreMessagesObserveValue, null, null);
    //
    IObservableValue btnFlushObserveSelectionObserveWidget = SWTObservables.observeSelection(btnFlush);
    IObservableValue parametersFlushMessagesObserveValue = BeansObservables.observeValue(parameters, "flushMessages");
    bindingContext.bindValue(btnFlushObserveSelectionObserveWidget, parametersFlushMessagesObserveValue, null, null);
    //
    return bindingContext;
  }
View Full Code Here


    btnUp.setEnabled(size != 0 && 0 < index && index < size);
    btnDown.setEnabled(size != 0 && 0 <= index && index < size - 1);
  }
 
  protected DataBindingContext initDataBindings() {
    DataBindingContext bindingContext = new DataBindingContext();
    //
    ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
    parentsTableViewer.setContentProvider(listContentProvider);
    //
    WritableList writableList = parameters.getParents();
View Full Code Here

    _elementNameField.setEnabled(elementNameEnabled);
    _elementTypeField.setText(elementType);
    _elementTypeField.setEnabled(elementTypeEnabled);

    if (cache != null) {
      _dataBindingContext = new DataBindingContext();
      _refactoringElement = new RefactoringWodElement(_wodElement, cache);

      if (elementNameEnabled) {
        bindElementName(cache);
      }
View Full Code Here

    if (!ComparisonUtils.equals(entity, myEntity)) {
      disposeBindings();

      myEntity = entity;
      if (myEntity != null) {
        myBindingContext = new DataBindingContext();
        myBindingContext.bindValue(SWTObservables.observeText(myNameText, SWT.Modify), BeansObservables.observeValue(myEntity, EOEntity.NAME), null, null);
        myBindingContext.bindValue(SWTObservables.observeText(myExternalNameText, SWT.Modify), BeansObservables.observeValue(myEntity, EOEntity.EXTERNAL_NAME), null, null);
        myBindingContext.bindValue(SWTObservables.observeText(myClassNameText, SWT.Modify), BeansObservables.observeValue(myEntity, EOEntity.CLASS_NAME), null, null);
        myBindingContext.bindValue(SWTObservables.observeText(myRestrictingQualifierText, SWT.Modify), BeansObservables.observeValue(myEntity, EOEntity.RESTRICTING_QUALIFIER), null, null);
        myBindingContext.bindValue(SWTObservables.observeSelection(myAbstractButton), BeansObservables.observeValue(myEntity, EOEntity.ABSTRACT_ENTITY), null, new BooleanUpdateValueStrategy());
View Full Code Here

    disposeBindings();

    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    _entity = (EOEntity) selectedObject;
    if (_entity != null) {
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_maxNumberOfInstancesToBatchFetchText, SWT.Modify), BeansObservables.observeValue(_entity, EOEntity.MAX_NUMBER_OF_INSTANCES_TO_BATCH_FETCH), null, null);
      // new BindSpec(null, null, new RegexStringValidator("^[0-9]*$",
      // "^[0-9]+$", "Please enter a number"), null));
      _bindingContext.bindValue(SWTObservables.observeSelection(_cacheInMemoryButton), BeansObservables.observeValue(_entity, EOEntity.CACHES_OBJECTS), null, new BooleanUpdateValueStrategy());
      _bindingContext.bindValue(SWTObservables.observeSelection(_readOnlyButton), BeansObservables.observeValue(_entity, EOEntity.READ_ONLY), null, new BooleanUpdateValueStrategy());
View Full Code Here

    disposeBindings();

    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    myEntity = (EOEntity) selectedObject;
    if (myEntity != null) {
      myBindingContext = new DataBindingContext();
      myEntity.addPropertyChangeListener(EOEntity.FETCH_SPECIFICATION, myFetchSpecListener);
      myEntity.addPropertyChangeListener(EOEntity.FETCH_SPECIFICATIONS, myFetchSpecListener);
      myFetchSpecsViewer.setInput(myEntity);
      fetchSpecsChanged();
    }
View Full Code Here

  private void bind() {
    // XXX This method is too long
    if (myDisplayGroup == null) {
      return;
    }
    myBindingContext = new DataBindingContext();

    myBindingContext
        .bindValue(SWTObservables.observeText(myNameText, SWT.Modify), BeansObservables.observeValue(myDisplayGroup, DisplayGroup.NAME), null, null);

    myBindingContext.bindList(SWTObservables.observeItems(myClassNameCombo), BeansObservables.observeList(Realm.getDefault(), myDisplayGroup,
View Full Code Here

      _argument = argument;

      if (_argument != null) {
        // myArgumentTypeComboViewer.setInput(myAttribute);
        _bindingContext = new DataBindingContext();
        _bindingContext.bindValue(SWTObservables.observeText(_nameText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.NAME), null, null);
        _bindingContext.bindValue(SWTObservables.observeText(_columnNameText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.COLUMN_NAME), null, null);
        _bindingContext.bindValue(SWTObservables.observeText(_definitionText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.DEFINITION), null, null);
        _bindingContext.bindValue(SWTObservables.observeText(_externalTypeText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.EXTERNAL_TYPE), null, null);
        _bindingContext.bindValue(SWTObservables.observeText(_classNameText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.CLASS_NAME), null, null);
View Full Code Here

    } else if (selectedObject instanceof EOAttributePath) {
      _attribute = ((EOAttributePath) selectedObject).getChildAttribute();
    }

    if (_attribute != null) {
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeSelection(_readOnlyButton), BeansObservables.observeValue(_attribute, EOAttribute.READ_ONLY), null, new BooleanUpdateValueStrategy());
      _bindingContext.bindValue(SWTObservables.observeSelection(_clientClassPropertyButton), BeansObservables.observeValue(_attribute, EOAttribute.CLIENT_CLASS_PROPERTY), null, new BooleanUpdateValueStrategy());
      _bindingContext.bindValue(SWTObservables.observeSelection(_commonClassPropertyButton), BeansObservables.observeValue(_attribute, EOAttribute.COMMON_CLASS_PROPERTY), null, new BooleanUpdateValueStrategy());
      _bindingContext.bindValue(SWTObservables.observeSelection(_generateSourceButton), BeansObservables.observeValue(_attribute, EOAttribute.GENERATE_SOURCE), null, new BooleanUpdateValueStrategy());
      _bindingContext.bindValue(SWTObservables.observeText(_readFormatText, SWT.Modify), BeansObservables.observeValue(_attribute, EOAttribute.READ_FORMAT), null, null);
View Full Code Here

  protected String getString(String name) {
    return name;
  }

  protected void createFormContent(IManagedForm managedForm) {
    _bindingContext = new DataBindingContext();

    ScrolledForm form = managedForm.getForm();
    form.setText("EOGenerator");

    FormToolkit toolkit = managedForm.getToolkit();
View Full Code Here

TOP

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

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.