Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Possible bug in NatCombo using multiselect with easy fix
Possible bug in NatCombo using multiselect with easy fix [message #1772920] Mon, 18 September 2017 17:32 Go to next message
Louis Detweiler is currently offline Louis DetweilerFriend
Messages: 57
Registered: August 2017
Member
Hey,

When using a multiselect NatCombo combobox cell editor, the order that the selections are displayed is random and not consistent with the order that they are displayed in the drop down menu. This could possibly be undesirable in some use cases, for example in mine.

Through some debugging I discovered that this is because the selectionStateMap is declared as a HashMap in the setItems method, which is unordered, so it jumbles things when they are selected. However, if instead it is declared as a LinkedHashMap, it then preserves the ordering and fixes the issue.

I'm not sure if there is a different reason why the selectionStateMap is a HashMap as opposed to a LinkedHashMap or not, but if this is indeed a bug the fix is extremely simple.

Just wanted to notify you about this matter.

Best,

Louis
Re: Possible bug in NatCombo using multiselect with easy fix [message #1772921 is a reply to message #1772920] Mon, 18 September 2017 17:39 Go to previous messageGo to next message
Louis Detweiler is currently offline Louis DetweilerFriend
Messages: 57
Registered: August 2017
Member
P.S. I would be happy to contribute this bug fix if it is indeed a bug, but I am unfamiliar with how the process of contributing to NatTable works.

Best,

Louis
Re: Possible bug in NatCombo using multiselect with easy fix [message #1772925 is a reply to message #1772921] Mon, 18 September 2017 19:00 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2624
Registered: July 2012
Senior Member
Well I am not sure whether this is a bug. I would say it does not matter for the current implementation. If you see an issue and it does not violate other use cases provide a fix and we can see if there are side effects.

The process is the same as for contributing to Eclipse itself. Have a look at the free ebook from Lars Vogel on this topic: http://www.vogella.com/books/eclipsecontribution.html

In the end you create a ticket in Bugzilla and contribute the fix via Gerrit. The organizational stuff should be explained in the book (e.g. create an Eclipse account, register in Gerrit, setup the IDE).

Our contribution guide might also be helpful: https://www.eclipse.org/nattable/documentation.php?page=contribution_guide
Previous Topic:TableCellPainter trouble
Next Topic:Scrolling row into view programmatically
Goto Forum:
  


Current Time: Fri Nov 16 00:50:22 GMT 2018

Powered by FUDForum. Page generated in 0.01963 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top