Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [DataBinding] ~Example
[DataBinding] ~Example [message #313609] Tue, 20 March 2007 15:48 Go to next message
Roshan S. is currently offline Roshan S.Friend
Messages: 125
Registered: July 2009
Senior Member
Hi, I'm hoping to get a simple running example of databinding. This is
the sample I downloaded from the JFace DataBinding page on Eclipse.org:

package org.eclipse.example;

import org.eclipse.core.databinding.DataBindingContext;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class DataBind {
Display display=new Display();
Shell shell=new Shell(display);
Text text = new Text(shell, SWT.BORDER);
// Make Person (domain model) object
SimplePerson person = new SimplePerson("Boris", "2670 Queensview Dr",
"Ottawa", "Canada");
// Bind the Person's name to the SWT Text
DataBindingContext dbc = BindingFactory.createContext(shell);
dbc.bind(text, new Property(person, "name"), null);
}

It's giving me an error for BindingFactory, which I cannot find. I also
replaced Person with SimplePerson.

Does anyone see a problem with the code I'm trying to implement. I
can't keep up with what's in the old version and what will work with 3.3
.. I'd like to use it with 3.2, but I believe it was said that
databinding was for 3.3.

Thanks,
Roshan
Re: [DataBinding] ~Example [message #313631 is a reply to message #313609] Wed, 21 March 2007 01:38 Go to previous messageGo to next message
Brad Reynolds is currently offline Brad ReynoldsFriend
Messages: 309
Registered: July 2009
Senior Member
BindingFactory doesn't exist anymore and hasn't for a while. Can you
point me to the page that had this code? I need to get it cleaned up. We
have examples in a project checked into CVS[1].

What is in CVS today will work with Eclipse 3.2.x as we only depend upon
3.2.x APIs. The goal is to have JFace Data Binding 1.0 to be usable with
Eclipse 3.2.x. The only issue that you'll have is that you'll need to
build it from source. The reason being that in 3.3 the viewer API is not
"binary downwards compatible"[1] but it is source compatible.

-brad

[1]
http://wiki.eclipse.org/index.php/JFace_Data_Binding_FAQ#Whe re_can_I_find_examples_of_how_to_use_data_binding.3F
Re: [DataBinding] ~Example [message #313691 is a reply to message #313631] Thu, 22 March 2007 14:56 Go to previous messageGo to next message
Roshan S. is currently offline Roshan S.Friend
Messages: 125
Registered: July 2009
Senior Member
The link was for an EclipseCon 2006 presentation on the JFace page:
http://wiki.eclipse.org/index.php/JFace_Data_Binding (its under
Tutorials and Presentations )

This is the actual doc I was reading:
http://wiki.eclipse.org/index.php/Image:Databinding.pdf

-Roshan

Brad Reynolds wrote:
> BindingFactory doesn't exist anymore and hasn't for a while. Can you
> point me to the page that had this code? I need to get it cleaned up.
> We have examples in a project checked into CVS[1].
>
> What is in CVS today will work with Eclipse 3.2.x as we only depend upon
> 3.2.x APIs. The goal is to have JFace Data Binding 1.0 to be usable
> with Eclipse 3.2.x. The only issue that you'll have is that you'll need
> to build it from source. The reason being that in 3.3 the viewer API is
> not "binary downwards compatible"[1] but it is source compatible.
>
> -brad
>
> [1]
> http://wiki.eclipse.org/index.php/JFace_Data_Binding_FAQ#Whe re_can_I_find_examples_of_how_to_use_data_binding.3F
>
>
Re: [DataBinding] ~Example [message #313706 is a reply to message #313691] Thu, 22 March 2007 21:22 Go to previous message
Brad Reynolds is currently offline Brad ReynoldsFriend
Messages: 309
Registered: July 2009
Senior Member
> The link was for an EclipseCon 2006 presentation on the JFace page:
> http://wiki.eclipse.org/index.php/JFace_Data_Binding (its under
> Tutorials and Presentations )

> This is the actual doc I was reading:
> http://wiki.eclipse.org/index.php/Image:Databinding.pdf

You somehow chose to look at everything that was old. :) We'll try to get
that stuff cleaned up but the appropriate place for code examples is
always going to be CVS because you can assume that if it's checked in and
compiles it is up to date.

-brad
Previous Topic:Java context completion / source navigation breaks
Next Topic:[ANN] The Eclipse Google Summer of Code 2007 in on - students and mentors wanted - deadline is March
Goto Forum:
  


Current Time: Fri Jul 19 14:28:38 GMT 2024

Powered by FUDForum. Page generated in 0.09996 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top