Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Boolean in ComboBoxCellEditor
Boolean in ComboBoxCellEditor [message #1282604] Wed, 02 April 2014 15:15 Go to next message
Emre T is currently offline Emre TFriend
Messages: 119
Registered: April 2013
Senior Member
Hello!

I have a table viewer with two columns with the second one supported by an extended EditingSupport class. The data binding between the UI and the EMF model is there. In my editing support I use simple TextCellEditors for the String and Integer etc. and ComboBoxViewerCellEditor for Enums.

I also have Boolean attributes in my model for which I would also like to use a ComboBox in my table editor. But I wasn't able to get to the Boolean values from the model. Actually, it was the EDataType when I debugged into the object in the cells, though it was still the default value of the Boolean attribute, "false".

I need to implement for Boolean values the logic of the getCellEditor(Object element) and setValue(Object element, Object value) methods of the EditingSupport. But by inspecting the "element" in the cells of the table viewer, I get the EDataType and not the Boolean. So the question is how to get and set (by using EMF Commands) the values of the Boolean attribute using the ComboBoxViewerCellEditor, when the Object being accessed is an EDataType?

I will be very glad, if you could help me with this issue!

Thanks and best regards.

Emre
Re: Boolean in ComboBoxCellEditor [message #1289302 is a reply to message #1282604] Wed, 09 April 2014 07:46 Go to previous messageGo to next message
Hussein MHANNA is currently offline Hussein MHANNAFriend
Messages: 45
Registered: February 2014
Location: LAVAL
Member
Hi Emre,

Have you tried to use the class org.eclipse.ui.views.properties.PropertyColumnLabelProvider as EditingSupport? This use the same mechanism as the porpetis view.

If it does not answer your question, could you give more detail?

Hussein


ALL4TEC
Re: Boolean in ComboBoxCellEditor [message #1304380 is a reply to message #1289302] Sat, 19 April 2014 21:24 Go to previous message
Emre T is currently offline Emre TFriend
Messages: 119
Registered: April 2013
Senior Member
Hello again,

nope, I haven't tried that one, since I already had implemented my own editing support extending EditingSupport for various other data types. And to be honest I had to work my way into the mentioned label provider and I am further not so sure about, how the my EMF data binding should work with it.

But thanks any way. I have solved the problem and integrated all types of EAttributes in my editing support, all implemented with difference cell editors.

Now the next step is to make use the EReferences, too. Actually again, just like in Properties View. Smile

Best regards!
Previous Topic:Ctrl + A in SourceViewer returns empty TextSelection
Next Topic:[Databinding] multi-layered binding with master detail scenario
Goto Forum:
  


Current Time: Sat Nov 17 18:57:32 GMT 2018

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

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

Back to the top