Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Potential bug in SelectionModel.java
Potential bug in SelectionModel.java [message #1771382] Thu, 24 August 2017 13:20 Go to next message
Wallace Lake is currently offline Wallace LakeFriend
Messages: 5
Registered: August 2017
Junior Member
Hi,

I'm not sure whether this is the right forum for this, but I cannot verify the behavior that I don't know, as I only stumbled upon this line while browsing the code:

Line 660 in org\eclipse\nebula\widgets\nattable\selection\SelectionModel.java
Range changedRange = new Range(rectangle.y, rectangle.y + rectangle.height);


'rectangle.y' is used, as in line 685. However, line 660 is meant for column positions, so I would think 'rectangle.x' is the corresponding range.

Was that intentional?

Toggle Spoiler
Re: Potential bug in SelectionModel.java [message #1771430 is a reply to message #1771382] Fri, 25 August 2017 05:49 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2627
Registered: July 2012
Senior Member
You might be correct. I am not sure if we have test cases or even use cases for that scenario.

How did you find it? Do you have a use case/test case that fails here?

Feel free to provide a Gerrit patch to fix this.
Re: Potential bug in SelectionModel.java [message #1771471 is a reply to message #1771430] Fri, 25 August 2017 11:28 Go to previous messageGo to next message
Wallace Lake is currently offline Wallace LakeFriend
Messages: 5
Registered: August 2017
Junior Member
I do not have a test case, nor knowing what the scenario would be.
I'm adapting NatTable for our use case, and found a few lines that look less intuitive / wrong at first glance while browsing the code.

At the moment I'm still halfway through the code base; I will submit the fixes to Gerrit when I'm done.
Is the policy/preference to bundle all these unrelated tiny changes in a single patch, or each as a separate patch?
Re: Potential bug in SelectionModel.java [message #1771473 is a reply to message #1771471] Fri, 25 August 2017 11:33 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2627
Registered: July 2012
Senior Member
Please provide each change as a separate patch, as this makes it easier to review. Also in later stages it is easier to understand why some changes where made.
Previous Topic:Best Practice about uncommon table layout
Next Topic:Background color in a cell
Goto Forum:
  


Current Time: Tue Nov 20 07:28:24 GMT 2018

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

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

Back to the top