myBindingContext = BindingFactory.createContext(); myBindingContext.bind(myReadOnlyButton, new Property(myAttribute, EOAttribute.READ_ONLY), null); myBindingContext.bind(myIndexedButton, new Property(myAttribute, EOAttribute.INDEXED), null); myBindingContext.bind(myReadFormatText, new Property(myAttribute, EOAttribute.READ_FORMAT), null); myBindingContext.bind(myWriteFormatText, new Property(myAttribute, EOAttribute.WRITE_FORMAT), null);
if (myAttribute != null) { myBindingContext = BindingFactory.createContext(); myBindingContext.bind(myReadOnlyButton, new Property(myAttribute, EOAttribute.READ_ONLY), null); myBindingContext.bind(myIndexedButton, new Property(myAttribute, EOAttribute.INDEXED), null); myBindingContext.bind(myReadFormatText, new Property(myAttribute, EOAttribute.READ_FORMAT), null); myBindingContext.bind(myWriteFormatText, new Property(myAttribute, EOAttribute.WRITE_FORMAT), null); }
  public void setInput(IWorkbenchPart _part, ISelection _selection) {    super.setInput(_part, _selection);    disposeBindings();    Object selectedObject = ((IStructuredSelection) _selection).getFirstElement();    if (selectedObject instanceof EOAttribute) {      myAttribute = (EOAttribute) selectedObject;    }    else if (selectedObject instanceof EOAttributePath) {      myAttribute = ((EOAttributePath) selectedObject).getChildAttribute();    }    myBindingContext = BindingFactory.createContext();    myBindingContext.bind(myReadOnlyButton, new Property(myAttribute, EOAttribute.READ_ONLY), null);    myBindingContext.bind(myIndexedButton, new Property(myAttribute, EOAttribute.INDEXED), null);    myBindingContext.bind(myReadFormatText, new Property(myAttribute, EOAttribute.READ_FORMAT), null);    myBindingContext.bind(myWriteFormatText, new Property(myAttribute, EOAttribute.WRITE_FORMAT), null);  }