Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327011 - MarkerSupport broken after refactoring
Summary: MarkerSupport broken after refactoring
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 10:08 EDT by Steffen Kriese CLA
Modified: 2011-06-15 08:33 EDT (History)
0 users

See Also:


Attachments
Fixes a possible typo in the AbstractSWTWidgetRidget (935 bytes, patch)
2010-10-05 10:10 EDT, Steffen Kriese CLA
no flags Details | Diff

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