Friday, October 27, 2006
Tuesday, October 24, 2006
JFace Data Binding Google Search
I've done some tweaking and added the following refinements:
- Searches bugzilla for the entered text and adds "[DataBinding]" to the search as all Data Binding bugs contain this in the title.
- Search CVS and CVS commit messages.
- Searches eclipsezone.com/forums and the platform-ui-dev mailing list adding 'databinding OR "data binding"' to narrow the search.
When using any refinement it limits the searches to the sites I have listed for the refinement rather than just favoring the listed sites.
The main search searches the following sites:
This works nicely when combined with Firefox's keyword search or SafariStand's quick search.
Monday, October 23, 2006
Exception in thread "main" org.eclipse.jface.internal.databinding.provisional.BindingException: No binding found for target: org.eclipse.jface.internal.databinding.internal.swt.TextObservableValue, model: org.eclipse.jface.databinding.observable.value.WritableValue
The issue is that the incorrect BindSpec has been passed to DataBindingContext.bind(...). But how can that be? Shouldn't the API enforce the correct type? Yes, well most of the time is should...
The signature for bind(...) is as follows...
public Binding bind(Object targetDescription,Object modelDescription, org.eclipse.jface.databinding.BindSpec bindSpec)
The method expects an instance of org.eclipse.jface.databinding.BindSpec. This is the 1.0 BindSpec. The problem is that internally if bind(...) doesn't receive an instance of org.eclipse.jface.internal.databinding.provisional.BindSpec, the provisional BindSpec, it won't create the Binding. The reason for this confusion is that we're trying to keep the provisional APIs working while refactoring to the 1.0 APIs. So even though the signature of the bind(...) method accepts org.eclipse.jface.databinding.BindSpec don't pass this type, pass org.eclipse.jface.internal.databinding.provisional.BindSpec instead.
So let's recap, when using the provisional DataBindingContext...
org.eclipse.jface.databinding.BindSpec == bad
org.eclipse.jface.internal.databinding.provisional.BindSpec == good
For more information see bug 161498.
Tuesday, October 17, 2006
- bug 147563 - [DataBinding] Need a standard factory for data binding contexts
"Those who already smoked the weed of the Überfactory and can't give up are advised to roll their own factories, or move to stronger stuff like e.g. AOP.""- comment 75
If you are familiar with the Eclipse 3.2 version of Data Binding you might be familiar with the "Uber factories" that were used to create
Bindings. The factories,
IObservableFactory, have been deprecated as we decided to keep the API simple and expressive in order to allow for transparency, simpler debugging, and better documentation. Currently there is SWT support using the new approach but we haven't moved the JFace support to the new API yet. For examples of the approach see SWTObservables and BeansObservables. Also, before the 1.0 release the static factory methods on
SWTObservableswill be changed from having a "get" prefix to an "observe" prefix.
- bug 153630 - [DataBinding] Extract SWT specific code from JFace databinding into its own bundle
- As of 20061004 what was org.eclipse.jface.databinding has been broken out into 3 separate plug-ins. The core framework no longer has SWT dependencies. The projects and their dependencies are as follows:
org.eclipse.jface.databinding "core data binding framework"
class library: J2ME Foundation 1.0
org.eclipse.jface.databinding.ui "binding to SWT and JFace"
class library: J2ME Foundation 1.0
org.eclipse.jface.databinding.beans "binding to Java beans"
class library: J2SE 1.4
- Spreadsheet Example
- Boris has been working on a Spreadsheet implemented using Data Binding. It's an interesting example that uses ComputedValue in case you'd like to see it in action.
- bug 116920 - [DataBinding] need to handle model change events which don't happen in the UI thread
- It looks like progress is being made on the concurrency front. If you have any input/concerns on concurrency in the framework please add them to the bug. The issue is that the framework is not thread safe and if possible we'd like it to be for the 1.0 release.
- We have a FAQ
- A FAQ has been started on Eclipsepedia.