Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 135446 - [DataBinding] Provide javadoc for TextObservableValue
Summary: [DataBinding] Provide javadoc for TextObservableValue
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.3 M1   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-06 23:41 EDT by Brad Reynolds CLA
Modified: 2006-08-08 15:04 EDT (History)
1 user (show)

See Also:


Attachments
TextObservableValue patch (6.97 KB, text/plain)
2006-04-06 23:42 EDT, Brad Reynolds CLA
no flags Details
JUnit (1.33 KB, text/plain)
2006-04-06 23:43 EDT, Brad Reynolds CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Reynolds CLA 2006-04-06 23:41:51 EDT
While trying to dig through and understand the goings on of Data Binding I started commenting the code in TextObservableValue for my own benefit and figured I'd give it back in case it could be used.  I made 2 small code changes.  

* I renamed the parameter and instance variable that were named "updatePolicy" to "updateEventType".  The reason for this was that initially because of the name "updatePolicy" I had assumed that it was accepting either DataBindingContext.TIME_EARLY or DataBindingContext.TIME_LATE.  The confusion came when the code was then treating it as an SWT event type.
* Added checks to the constructor that validated the inputs mostly out of habit.  Since I touched it by changing the parameter name I figured I should validate it as well.

I'll attach the patch and a JUnit.  All existing tests in TextControlScenario still pass.
Comment 1 Brad Reynolds CLA 2006-04-06 23:42:17 EDT
Created attachment 37964 [details]
TextObservableValue patch
Comment 2 Brad Reynolds CLA 2006-04-06 23:43:00 EDT
Created attachment 37965 [details]
JUnit
Comment 3 Boris Bokowski CLA 2006-06-16 18:40:36 EDT
I have released the patch (with modifications to the copyright notice and some of the Javadoc, and changing the NPE to an IAE), and added the test to the suite.

Thanks!
Comment 4 Boris Bokowski CLA 2006-08-08 15:04:18 EDT
Verified by looking at the source for I20060807-2000.