Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [JFace,Databinding]BooleanCellEditor not updating model
[JFace,Databinding]BooleanCellEditor not updating model [message #334748] Thu, 26 February 2009 00:00 Go to next message
Tankut Koray is currently offline Tankut KorayFriend
Messages: 49
Registered: July 2009
Member
Hi,

I am trying to use BooleanCellEditor, that I found in JFace snippets, with
databinding to an EMF model object using ObservableValueEditingSupport.

But I think it is not updating the model object and also not working well
its LabelProvider. I tried to debug this and I think it is something about
deactivating. It just not triggers editor update so editingsupport is not
working to update. Well, I looked at ComboboxCellEditor code and updated
BooleanCellEditor deactivation with following:

Object newValue = doGetValue();
markDirty();
boolean isValid = isCorrect(newValue);
setValueValid(isValid);
fireApplyEditorValue();
deactivate();

Well it seems to update the model object now. But the problem is that, if I
enter editing mode and leave without changing the checkbox state, after
exiting editing mode LabelProvider does not show anything. I am not sure if
it is even called.

Can someone help me with this?

Thanks,
Tankut Koray
Re: [JFace,Databinding]BooleanCellEditor not updating model [message #334768 is a reply to message #334748] Thu, 26 February 2009 16:16 Go to previous message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
Could you provide a standalone snippet demonstrating the problem you're
seeing? This is tough to visualize

Matthew

Tankut Koray wrote:
> Hi,
>
> I am trying to use BooleanCellEditor, that I found in JFace snippets,
> with databinding to an EMF model object using
> ObservableValueEditingSupport.
>
> But I think it is not updating the model object and also not working
> well its LabelProvider. I tried to debug this and I think it is
> something about deactivating. It just not triggers editor update so
> editingsupport is not working to update. Well, I looked at
> ComboboxCellEditor code and updated BooleanCellEditor deactivation with
> following:
>
> Object newValue = doGetValue();
> markDirty();
> boolean isValid = isCorrect(newValue);
> setValueValid(isValid);
> fireApplyEditorValue();
> deactivate();
>
> Well it seems to update the model object now. But the problem is that,
> if I enter editing mode and leave without changing the checkbox state,
> after exiting editing mode LabelProvider does not show anything. I am
> not sure if it is even called.
>
> Can someone help me with this?
>
> Thanks,
> Tankut Koray
>
>
Previous Topic:Loading xml files from jars at the runtime
Next Topic:[DataBinding] Best pratice to observe instance model (Bean, EMF..) which change
Goto Forum:
  


Current Time: Sat Jul 13 16:51:32 GMT 2024

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

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

Back to the top