Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320154

Summary: Handle an enum by ComboView
Product: [Technology] XWT Reporter: Yves YANG <yves.yang>
Component: CoreAssignee: Project Inbox <e4.xwt-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Yves YANG CLA 2010-07-16 21:51:01 EDT
At the current implementation, ComboView supports to deal a collection of elements including array, But there is a special set of items in Java language. It is an enumeration.

We have received such request in e4 forum:
http://www.eclipse.org/forums/index.php?t=msg&th=171917&start=0&

We need to find a simple syntax and data binding to define the enumeration data selection.
Comment 1 Yves YANG CLA 2010-07-18 02:02:04 EDT
We should provide the enumeration type as the binding source of input property: 
  <ComboViewer input="{Binding source={x:Type j:EmployeeType}}"/>
where EmployeeType is enum like:

enum EmployeeType {
   FullTime, PartialTime, Unemployed.
}
Comment 2 Yves YANG CLA 2010-07-18 02:02:47 EDT
The implementation is done and committed in CVS.