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

Bug 580066

Summary: Given constructor argument ignored
Product: [Technology] NatTable Reporter: Gerhard Kreuzer <gerhard.kreuzer>
Component: CoreAssignee: Dirk Fauth <dirk.fauth>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dirk.fauth, gerhard.kreuzer
Version: 2.0.2   
Target Milestone: 2.0.3   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/193923
https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=1057bb9780955dfbf86bc9abf99eafb26294b574
Whiteboard:

Description Gerhard Kreuzer CLA 2022-06-01 11:28:21 EDT
While browsing the source code to look up some details, I stumbled over this NatCombo constructor, which IMHO shows a copy&paste bug:

 public NatCombo(Composite parent, IStyle cellStyle, int maxVisibleItems, 
                 int style, Image iconImage) {
        this(parent, cellStyle, maxVisibleItems, style, 
             GUIHelper.getImage("down_2"), false); //$NON-NLS-1$
    }

[Copied from org.eclipse.nebula.widgets.nattable.widget.NatCombo lines 364-366]

The parameter I'm speeking of is iconImage, which is ignored in favor of the "down_2" image.

Is this intentional?

As I said, I came across this by accident and it does not bother me currently, but I think it should be fixed.
Comment 1 Eclipse Genie CLA 2022-06-03 01:03:14 EDT
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/193923
Comment 3 Dirk Fauth CLA 2022-06-03 01:20:35 EDT
Yes this looks like a copy&paste bug. Thanks for reporting, should be fixed with the applied commit.
Comment 4 Dirk Fauth CLA 2022-08-09 02:29:18 EDT
Released with 2.0.3