List of usage examples for org.eclipse.jface.databinding.fieldassist ControlDecorationSupport dispose
public void dispose()
From source file:com.nextep.designer.vcs.ui.editors.base.AbstractFormEditor.java
License:Open Source License
/** * This method initialize properly the {@link DataBindingContext} and delegates the binding * setup to the implementations.//from www . j a v a 2 s . co m */ @SuppressWarnings("unchecked") protected final void bindModel() { if (context == null) { context = new DataBindingContext(); } else { if (!detailPart) { // Disposing every binding, not sure whether this is needed, but otherwise we would // need // to dispose the ControlDecorationSupport so it seems safer to dispose the whole // binding for (Object b : new ArrayList<Object>(context.getBindings())) { ((Binding) b).dispose(); } for (ControlDecorationSupport s : fieldDecorators) { s.dispose(); } // Disposing our data binding context on current element context.getValidationRealm().exec(new Runnable() { @Override public void run() { context.dispose(); } }); context = new DataBindingContext(); } } doBindModel(context); }