| Summary: | Enum property editor does not respond to changes in DefaultValueService | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Ling Hao <ling.hao> | ||||
| Component: | Sapphire | Assignee: | Project Inbox <sapphire.ui-inbox> | ||||
| Status: | RESOLVED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | konstantin | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Ling Hao
Created attachment 202181 [details]
Apply the patch to org.eclipse.sapphire.samples.gallery project
This bug is missing problem description... - Apply the attached patch - sapphire-gallery.xml -> List Properties -> Hoterogeneous - create a child element with integer - String value: root Integer value: 1 Enum value: yes - create another child element with integer - String value: child Reference: root Integer value: 2 Enum value: maybe - Go back to root node, and change the integer and enum values - Go to child node, and notice the default value for integer has been updated, but not enum. I was able to trace the difference to the TextFieldBinding's DelayedTasksExecutor, but there nothing equivalent in AbstractEnumBinding. BTW, sorry about the multiple updates. You are still missing the problem statement. Is the issue that if default value is not static (custom DefaultValueService) that enum property editor does not react to changes? That's right, the enum property does not respond to changes in the DefautValueService. The issue here is that the system needs to know when to re-calculate the default value. The fact that this works with integers is accidental. The repro shouldn't work as written for either one.
What's necessary are @DependsOn declarations on IntegerValue and EnumValue properties:
@DependsOn( { "Reference", "StringValue", "#/IntegerValue" } )
ValueProperty PROP_INTEGER_VALUE = new ValueProperty( TYPE, "IntegerValue" );
@DependsOn( { "Reference", "StringValue", "#/EnumValue" } )
ValueProperty PROP_ENUM_VALUE = new ValueProperty( TYPE, "EnumValue" );
Once I add these annotations, the repro scenario works as intended.
Note that there is weird bug with @DependsOn annotation that I fixed that is related to this. Make sure that you have the fix for Bug 357161 before you try the above resolution.
|