Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » [xwt] combo cell editor for enums
[xwt] combo cell editor for enums [message #564864] Fri, 20 November 2009 13:02 Go to next message
Erdal Karaca is currently offline Erdal Karaca
Messages: 748
Registered: July 2009
Senior Member
I have bound a table viewer column to a emf model object's attribute which is an enum.
How can I set the <ComboBoxCellEditor /> to show the enum's literals?
And how to make the combo cell editor 'READ_ONLY'?
Re: [xwt] combo cell editor for enums [message #564883 is a reply to message #564864] Fri, 20 November 2009 14:19 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
"Erdal Karaca" <erdal.karaca.de@googlemail.com> wrote in message
news:he641g$6hp$1@build.eclipse.org...
>I have bound a table viewer column to a emf model object's attribute which
>is an enum.
> How can I set the <ComboBoxCellEditor /> to show the enum's literals?
> And how to make the combo cell editor 'READ_ONLY'?

You just need to follow the SWT concept:
<ComboBoxCellEditor x:Style="'READ_ONLY" />

We have the QA test for Combo. In general, it should work for ComboViewer.
Please let me know the result. If it doesn't work, feel free to open a bug .

Best regards
Yves YANG
Re: [xwt] combo cell editor for enums [message #673494 is a reply to message #564883] Mon, 23 May 2011 20:32 Go to previous message
Thomas Haertel is currently offline Thomas Haertel
Messages: 2
Registered: May 2011
Junior Member
Hi,

this thread seems to be very old, but I'm looking for the same solution.

When I try to create a ComboBoxCellEditor in the following way, I will get an ArrayStoreException in the ResourceLoader class:

<ComboBoxCellEditor x:Style="SWT.READ_ONLY" items="{Binding Source={x:Type z:ContactType}}" />

The namespaces are correct. If I use the Enum in a ComboViewer it is working without any problems.

Any idea what could be wrong?

I am using Eclipse 4.1M7 with e4 0.11M7.

Best regards
Thomas Haertel

Previous Topic:NPE on Closing e4 App
Next Topic:Which Feature contains the Visual Design Editor for e4?
Goto Forum:
  


Current Time: Thu Oct 23 01:42:18 GMT 2014

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

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