Package org.eclipse.core.databinding

Examples of org.eclipse.core.databinding.DataBindingContext


      _constraintCombo.setInput(_entityIndex);
      _indexTypeCombo.setInput(_entityIndex);
      _orderCombo.setInput(_entityIndex);
      _attributesEditor.setEntityIndex(_entityIndex);

      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_nameText, SWT.Modify), BeansObservables.observeValue(_entityIndex, EOEntityIndex.NAME), null, null);
      // _bindingContext.bindValue(ViewersObservables.observeSingleSelection(_constraintCombo),
      // BeansObservables.observeValue(_entityIndex,
      // EOEntityIndex.CONSTRAINT), null, null);
      // _bindingContext.bindValue(ViewersObservables.observeSingleSelection(_indexTypeCombo),
View Full Code Here


    disposeBindings();

    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    _storedProcedure = (EOStoredProcedure) selectedObject;
    if (_storedProcedure != null) {
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_nameText, SWT.Modify), BeansObservables.observeValue(_storedProcedure, EOStoredProcedure.NAME), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_externalNameText, SWT.Modify), BeansObservables.observeValue(_storedProcedure, EOStoredProcedure.EXTERNAL_NAME), null, null);
    }
  }
View Full Code Here

    disposeBindings();

    _databaseConfig = databaseContext;

    if (_databaseConfig != null) {
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_usernameText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.USERNAME), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_passwordText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.PASSWORD), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_urlText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.URL), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_driverText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.DRIVER), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_pluginText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.PLUGIN), null, null);
View Full Code Here

  public void setArgument(AbstractEOArgument _argument) {
    if (myBindingContext != null) {
      myBindingContext.dispose();
    }
    if (_argument != null) {
      myBindingContext = new DataBindingContext();
      myBindingContext.bindValue(SWTObservables.observeText(myExternalWidthText, SWT.Modify), BeansObservables.observeValue(_argument, AbstractEOArgument.WIDTH), null, null);
    }
  }
View Full Code Here

    disposeBindings();

    _databaseConfig = databaseContext;

    if (_databaseConfig != null) {
      _bindingContext = new DataBindingContext();
      _authenticationMethodComboViewer.setInput(_databaseConfig);
      _authenticationMethodBinding = new ComboViewerBinding(_authenticationMethodComboViewer, _databaseConfig, EODatabaseConfig.AUTHENTICATION_METHOD, null, null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_usernameText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.USERNAME), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_passwordText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.PASSWORD), null, null);
      _bindingContext.bindValue(SWTObservables.observeText(_serverUrlText, SWT.Modify), BeansObservables.observeValue(_databaseConfig, EODatabaseConfig.URL), null, null);
View Full Code Here

    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    _databaseConfig = (EODatabaseConfig) selectedObject;

    if (_databaseConfig != null) {
      _bindingContext = new DataBindingContext();
      addBindings();
    }

    adaptorNameChanged();
  }
View Full Code Here

    } else if (selectedObject instanceof EORelationshipPath) {
      _relationship = ((EORelationshipPath) selectedObject).getChildRelationship();
    }
    if (_relationship != null) {
      _relationship.addPropertyChangeListener(EORelationship.TO_MANY, _relationshipPropertyChangeListener);
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_numberOfToManyFaultsToBatchFetchText, SWT.Modify), BeansObservables.observeValue(_relationship, EORelationship.NUMBER_OF_TO_MANY_FAULTS_TO_BATCH_FETCH), null, null);
      // new BindSpec(null, null, new RegexStringValidator("^[0-9]*$",
      // "^[0-9]+$", "Please enter a number"), null)
      _bindingContext.bindValue(SWTObservables.observeSelection(_ownsDestinationButton), BeansObservables.observeValue(_relationship, EORelationship.OWNS_DESTINATION), null, new BooleanUpdateValueStrategy());
      _bindingContext.bindValue(SWTObservables.observeSelection(_propagatesPrimaryKeyButton), BeansObservables.observeValue(_relationship, EORelationship.PROPAGATES_PRIMARY_KEY), null, new BooleanUpdateValueStrategy());
View Full Code Here

    disposeBindings();

    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    _fetchSpecification = (EOFetchSpecification) selectedObject;
    if (_fetchSpecification != null) {
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_fetchLimitText, SWT.Modify), BeansObservables.observeValue(_fetchSpecification, EOFetchSpecification.FETCH_LIMIT), null, null);
      // new BindSpec(null, null, new RegexStringValidator("^[0-9]*$",
      // "^[0-9]+$", "Please enter a number"), null));
      _bindingContext.bindValue(SWTObservables.observeSelection(_promptsAfterFetchLimitButton), BeansObservables.observeValue(_fetchSpecification, EOFetchSpecification.PROMPTS_AFTER_FETCH_LIMIT), null, new BooleanUpdateValueStrategy());
      _bindingContext.bindValue(SWTObservables.observeSelection(_deepButton), BeansObservables.observeValue(_fetchSpecification, EOFetchSpecification.DEEP), null, new BooleanUpdateValueStrategy());
View Full Code Here

    }
  }

  protected void addBindings() {
    if (_fetchSpecification != null) {
      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_rawSQLText, SWT.Modify), BeansObservables.observeValue(_fetchSpecification, EOFetchSpecification.CUSTOM_QUERY_EXPRESSION), null, null);
      _fetchSpecification.getEntity().getModel().addPropertyChangeListener(EOModel.STORED_PROCEDURES, _storedProcedureChangedRefresher);
      _fetchSpecification.getEntity().getModel().addPropertyChangeListener(EOModel.STORED_PROCEDURE, _storedProcedureChangedRefresher);
      _fetchSpecification.addPropertyChangeListener(EOFetchSpecification.STORED_PROCEDURE, _storedProcedureChangedHandler);
      _fetchSpecification.addPropertyChangeListener(EOFetchSpecification.CUSTOM_QUERY_EXPRESSION, _storedProcedureChangedHandler);
View Full Code Here

    super.setInput(part, selection);
    removeListeners();
    if (selection instanceof IStructuredSelection) {
      _userInfoable = (UserInfoableEOModelObject) ((IStructuredSelection) selection).getFirstElement();

      _bindingContext = new DataBindingContext();
      _bindingContext.bindValue(SWTObservables.observeText(_documentationText, SWT.Modify), BeansObservables.observeValue(_userInfoable, UserInfoableEOModelObject.DOCUMENTATION_KEY), null, null);
      _bindingContext.bindValue(new BrowserTextObservableValue(_browser, "body { margin: 0px; margin-right: 10px; font-size: 0.8em; }"), BeansObservables.observeValue(_userInfoable, UserInfoableEOModelObject.DOCUMENTATION_KEY), null, null);
    } else {
      _userInfoable = null;
    }
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.