Community
Participate
Working Groups
3.3 RC1 The fix for bug 175817 fixed the problem in the SDK, but the fix is not good enough for 3.3: (In reply to bug 175817 comment #6) > Furthermore, you can't just set the input of the DetailsContentViewer to a > String and hope the client's label provider just passes the string on. (In reply to bug 175817 comment #10) > In any case, setDetailsLabelProvider(..) would have to specify how clients > must handle the additional element types. At last the Javadoc of setDetailsLabelProvider(..) needs to state explicitly that a String is passed as element for multiselections. I would also include the hint for clients that they can supply a custom message in that case and use #getSelectedItems() to get at the items count. This change also needs to be mentioned in the build notes, since it will affect existing clients whose label provider does not handle String elements. I even think this should be announced on the mailing list.
Created attachment 68568 [details] Fix
/** * Sets label provider for the details field. * * For a single selection, the element sent to {@link ILabelProvider#getImage(Object)} * and {@link ILabelProvider#getText(Object)} is the selected object, * for multiple selection a {@link String} with amount of selected items is the * element. * * @see {@link FilteredItemsSelectionDialog#getSelectedItems()} can be used to * retrieve selected items and get the items count. * * @param detailsLabelProvider * the label provider for the details field */ I think this is clearer. This is pretty unusual behaviour which we should revisit in 3.4.
I have updated the javadoc with my changes. Let me know if you want it refined further. Released to build 20070524-1300
"[..] @see {@link FilteredItemsSelectionDialog#getSelectedItems()} can be [..]" is not legal Javadoc, see http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#@see You can enable Javadoc validation in your compiler options to see such violations in Eclipse. The rest looks good.
Thanks Markus. We actually had 3 problem places and I fixed all of them.