Community
Participate
Working Groups
Created attachment 90042 [details] patch 3.4 M6 The following patch is an update on the ongoing effort to make API for labels with styles. - Reworked the SimpleStyledCellLabelProvider (SSCLP) to make it more consistent with other CellLabelProvider. No need for an inner class LabelInfoProvider: User update the labels in 'update'. I extended the ViewerCell to contain getter/setters for the styled ranges. I renamed SSCLP to 'StyledCellLabelProvider'. SSCLP is marked as deprecated and should be removed before M6. - StyledString: Represents a string with styled ranges - DelegatingStyledCellLabelProvider: An implementation of a StyledCellLabelProvider that delegates the request for styled text labels to a IStyledLabelProvider (inner class of DSCLP). This interface is useful when enhancing existing (old fashioned) ILabelProviders with styled label capability. In JDT we have lots of LP that are API and where we can change the hierarchy. - default decoration colors moved to JFace - JFacePreferences.QUALIFIER_COLOR, JFacePreferences.DECORATION_COLOR, JFacePreferences.COUNTER_COLOR... - open point: initialization of the colors: I'm not sure how this happens in JFace The patch also contains an update to the FilteredItemsSelectionDialog to allow subclasses to use styled labels (colors in the open type dialog)
Created attachment 90043 [details] JDT UI patch These are the changes in JDT UI: Attached to this bug to not loose them
Note that this patch also contains the changes requested for bug 218344.
Boris/Tom, is there a target milestone for this? PDE is very interested in adopting this.
Created attachment 90363 [details] uddated patch for JFace This updates the patch for JFace: - The DelegatingStyledCellLabelProvider now optionally takes a decorator and can act as a replacement of the DecoratingLabelProvider - renamed to DecoratingStyledCellLabelProvider It is open for discussion if it makes sense to rather have two classes DelegatingStyledCellLabelProvider and DecoratingStyledCellLabelProvider.
Created attachment 90364 [details] patch for JDT/UI
note that DecoratingStyledCellLabelProvider solves the flickering from label decorators (bug 219581) that we got again by switching to the StyledCellLabelProvider in M6
Tom, could you have a look at Martin's patch as well? I would like to know what you think about adding API to ViewerCell (other feedback is welcome too, of course).
OK. One small comment, when creating setData-constants we use Policy.JFACE + "...." as far as I remember. I'm fine with the new methods added.
First step. Released changes to: SimpleStyledCellLabelProvider.java StyledCellLabelProvider.java TableViewerRow.java TreeViewerRow.java ViewerCell.java ViewerRow.java with two additional null checks in StyledCellLabelProvider, and the change to the constant as suggested by Tom. I am now waiting for a new patch from Martin which splits DecoratingStyledCellLabelProvider into two separate classes, one for delegation, and the other for decoration.
I can't wait. http://www.youtube.com/watch?v=w-DcNPFWhbk
I also released StyledStringBuilder.java (renamed from StyledString.java), and associated changes in JFacePreferences.java. Outstanding changes: DecoratingStyledCellLabelProvider, snippets, and FilteredItemsSelectionDialog. Chris: http://www.youtube.com/watch?v=9yL715aBemA
Created attachment 90747 [details] Delegating and Decorating label provider & snippet update
Released "Delegating and Decorating label provider & snippet update" >20080226
Since we have a delayed I build today I have released the two additional classes for the I build.
Verified in I20080327-2251
Marking as verified.