Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332459 - Better enum comparison in ROV
Summary: Better enum comparison in ROV
Status: ASSIGNED
Alias: None
Product: RTSC
Classification: Technology
Component: Rta (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Sasha Slijepcevic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-13 13:20 EST by Chris McCormick CLA
Modified: 2012-07-10 20:02 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.