Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Select column & RowSelectionModel(Very long hang...)
Select column & RowSelectionModel [message #890982] Sat, 23 June 2012 16:54 Go to next message
Paul Woodward is currently offline Paul Woodward
Messages: 1
Registered: June 2012
Junior Member
There is a bug between SelectColumnCommandHandler and RowSelectionModel.

SelectColumnCommandHandler uses Integer.MAX_VALUE to identify all rows as being selected, however in RowSelectionModel, it has to iterate each row and store the values (where those rows exist). Looking up 2x10^9 rows takes a very long time however.

As a quick fix I've extended the RowSelectionModel as follows:

public void addSelection(final Rectangle range) {
if (range.y + range.height > gridLayer.getBodyDataProvider().getRowCount()) {
range.height = gridLayer.getBodyDataProvider().getRowCount() - range.y + 1;
}
super.addSelection(range);
}

Paul

Edit: version 2.3.1.1

[Updated on: Sat, 23 June 2012 18:06]

Report message to a moderator

Re: Select column & RowSelectionModel [message #891922 is a reply to message #890982] Tue, 26 June 2012 15:14 Go to previous message
Edwin Park is currently offline Edwin Park
Messages: 124
Registered: July 2009
Senior Member
Hi Paul,

Thanks for this - I have checked in a change to RowSelectionModel.addSelection() to consider the layer rowCount in order to limit the iteration. https://bugs.eclipse.org/bugs/show_bug.cgi?id=383565

Cheers,
Edwin
Next Topic:Select column upon RMB click
Goto Forum:
  


Current Time: Sun Sep 21 06:24:15 GMT 2014

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

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