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

Bug 327568

Summary: [DataBinding] attributeMaps marked private in ObservableMapCellLabelProvider
Product: [Eclipse Project] Platform Reporter: Ryan Dunn <oryandunn>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED DUPLICATE QA Contact: Matthew Hall <qualidafial>
Severity: minor    
Priority: P3    
Version: 4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ryan Dunn CLA 2010-10-12 11:06:45 EDT
Build Identifier: 

The documentation of the class notes "Clients may customize by subclassing and overriding update(ViewerCell)."  But within that method, a subclass would need to access the attributeMaps variable, just as the default update(ViewerCell) method does.  A subclass can create it's own attributeMaps varriable, override the constructor ObservableMapCellLabelProvider(IObservableMap[] attributeMaps), and the dispose() method to get the desired functionality, but that requires overriding two methods that will see no changes in the subclass.

Reproducible: Always
Comment 1 Ryan Dunn CLA 2010-10-12 11:08:22 EDT
(In reply to comment #0)
> Build Identifier: 
> 
> The documentation of the class notes "Clients may customize by subclassing and
> overriding update(ViewerCell)."  But within that method, a subclass would need
> to access the attributeMaps variable, just as the default update(ViewerCell)
> method does.  A subclass can create it's own attributeMaps varriable, override
> the constructor ObservableMapCellLabelProvider(IObservableMap[] attributeMaps),
> and the dispose() method to get the desired functionality, but that requires
> overriding two methods that will see no changes in the subclass.
> 
> Reproducible: Always

I forgot to state the obvious that attributeMaps should be marked protected to resolve this.
Comment 2 Ovidio Mallo CLA 2010-11-26 14:56:14 EST
Ryan, which version of DataBinding are you using? The attributeMaps fields of the ObservableMapCellLabelProvider and ObservableMapLabelProvider classes have already been changed to be protected as part of bug 302860.

*** This bug has been marked as a duplicate of bug 302860 ***