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

Bug 327011

Summary: MarkerSupport broken after refactoring
Product: [RT] Riena Reporter: Steffen Kriese <steffen.kriese>
Component: UIAssignee: Project Inbox <riena.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.0.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Fixes a possible typo in the AbstractSWTWidgetRidget none

Description Steffen Kriese CLA 2010-10-05 10:08:32 EDT
To support shared views the MarkerSupport has been refactored and now holds some of the controls settings like background and foreground-color.

The following tests are broken:
MarkerSupportTest.testClearAllMarkers()
TextRidgetSharedViewTest.testMandatoryMarkersInSharedViews()

The MarkerSupport has a Map internalData that holds the ridgets bg and fg-color. When addMarker is called the current bg-color of the control is saved in the Map to restore it, when the mandatory flag is removed from the ridget. But for some strange reason the bg-color gets overwritten with the mandatory bg-color. It seems like the internalData Map is cleared after the call to addMarker.
Comment 1 Steffen Kriese CLA 2010-10-05 10:10:31 EDT
Created attachment 180242 [details]
Fixes a possible typo in the AbstractSWTWidgetRidget

In the AbstractSWTWidgetRidget the calls to MarkerSupport bind and unbind seem to be mixed up.
Comment 2 Steffen Kriese CLA 2010-10-06 02:41:14 EDT
The MarkerSupportTest creates a MarkerSupport for testing but every Ridget gets its own MarkerSupport from the LNF.
Comment 3 Nobody - feel free to take it CLA 2010-10-06 03:12:48 EDT
unbindMarkerSupport was called before unbindUIControl where the caching of the visible-state took place. Reordering method-calls fixed the bug.