Problem Binding CellEditors to ViewerColumns

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Problem Binding CellEditors to ViewerColumns

Postby zephon » Thu Sep 30, 2010 9:11 pm

When editing the bindings between ViewerColumns and CellEditors in a TableViewer the code generated for a TextCellEditor binding looks like this:

Code: Select all
CellEditor cellEditor = new TextCellEditor(projectsTableViewer.getTable());
IValueProperty cellEditorProperty = CellEditorProperties.control().value(WidgetProperties.text());
IBeanValueProperty valueProperty = BeanProperties.value("fullName");
fullNameColumnViewer.setEditingSupport(ObservableValueEditingSupport.create(projectsTableViewer, bindingContext, cellEditor, cellEditorProperty, valueProperty));      


However, this does not work for reasons currently being debated here https://bugs.eclipse.org/bugs/show_bug.cgi?id=297495.

The code needs to be modified to pass "SWT.Modify" to WidgetProperties.text(). Making this change manually causes the modified code to be removed next time the bindings are generated from the WindowBuilder GUI.

I'd be happy to provide further details and submit a more official bug report, let me know what details you need.

In the meantime the workaround is to code these bindings by hand outside of initDataBindings().
zephon
 
Posts: 4
Joined: Thu Sep 30, 2010 9:03 pm

Re: Problem Binding CellEditors to ViewerColumns

Postby Eric Clayberg » Mon Oct 11, 2010 1:59 pm

Give this a try using the latest WindowBuilder build...

http://code.google.com/webtoolkit/tools ... -beta.html
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Problem Binding CellEditors to ViewerColumns

Postby zephon » Mon Oct 11, 2010 4:30 pm

That works. Thanks!
zephon
 
Posts: 4
Joined: Thu Sep 30, 2010 9:03 pm

Re: Problem Binding CellEditors to ViewerColumns

Postby Eric Clayberg » Mon Oct 11, 2010 4:48 pm

Glad that worked for you.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

cron