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

Bug 332459

Summary: Better enum comparison in ROV
Product: [Technology] RTSC Reporter: Chris McCormick <c-mccormick>
Component: RtaAssignee: Sasha Slijepcevic <sascha>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: dfriedland
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Chris McCormick CLA 2010-12-13 13:20:13 EST
When writing view code for ROV, it's difficult to compare enum config parameters to their values. I've looked at this before, and I believe it's because when the recap file is generated the enums are stored simply as strings, and aren't converted back to actual enum objects.

For example, you'd like to be able to write something like the following:

    if (modCfg.common$.diags_USER1 == Diags.ALWAYS_ON)

But instead, you have to write:

modCfg.common$.diags_USER1.equals(String(Diags.ALWAYS_ON));

Note: I haven't tried the above example specifically. See the UIA ServiceManager view for a real example.

The solution is probably to store the enums as actual objects, and convert them back to real enum objects at ROV time. Then, we need to ensure that the enum comparison functions properly.