Skip to main content



      Home
Home » Eclipse Projects » NatTable » IConfiguration initialized multiple times
IConfiguration initialized multiple times [message #1435958] Thu, 02 October 2014 03:30 Go to next message
Eclipse UserFriend
Hi,

I recently observed that a configuration is initialized more than once during a single call against NatTable#configure().

Layers that i am using (in that order):
ZoomedDataLayer
ColumnReorderLayer
ColumnHideShowLayer
NatSelectionLayer
ViewportLayer
FreezeLayer
CompositeFreezeLayer

Due to my layer configuration the configure gets called 4 times for the same configuration instance. The duplicate calls are caused by the CompositeFreezLayer as this layer gets the freeze, viewport and selection layer and also calls the configure on those. Is this behavior intended?

Can also be reproduced using the sample application. Add a breakpoint into the DefaultSelectionBindings#configureUiBindings method and open the FreezeExample.

Regards,
Michael
Re: IConfiguration initialized multiple times [message #1436325 is a reply to message #1435958] Thu, 02 October 2014 14:51 Go to previous messageGo to next message
Eclipse UserFriend
I don't think it is intended, but thinking of the current architecture I understand why it is that way. The ViewportLayer is part of all regions in the CompositeFreezeLayer. And with the mechanism to call configure() of the underlying layers in all regions, configure() is calles in the body layer stack layers multiple times.

Is this an issue somehow? AFAIK it wasn't an issue before.
Re: IConfiguration initialized multiple times [message #1436618 is a reply to message #1436325] Fri, 03 October 2014 02:13 Go to previous messageGo to next message
Eclipse UserFriend
We directly register a MouseListener to the underlying widget and that is now done more than once. But that's not a problem i can simply check whether the configuration has already been initialized Smile
Don't know if adding a KeyEventMatcher or a MouseEventMatcher more than once is a trouble for the NatTable itself. But as everything is working fine i assume it's not a problem Smile

[Updated on: Fri, 03 October 2014 02:14] by Moderator

Re: IConfiguration initialized multiple times [message #1436644 is a reply to message #1436618] Fri, 03 October 2014 03:11 Go to previous messageGo to next message
Eclipse UserFriend
Why are you registering a MouseListener via NatTable configuration? What kind of listener?

We would need to check whether the configuration is added more than once in the registry. And I agree that this is not perfect the way it is. Maybe we can add a configuration initialized check in general to the layers. But that needs to be tested well to ensure that there are no issues in building up configurations.

Nevertheless thanks for the hint, surely something for improvements. Smile
Re: IConfiguration initialized multiple times [message #1436743 is a reply to message #1436644] Fri, 03 October 2014 06:48 Go to previous message
Eclipse UserFriend
This is an older release of our software where we also use an older version of the NatTable. The version that we use there does not have the fix that you did some time ago regarding the context menu that does not always show up when right clicking.
Therefore we decided to simply register a mouse listener to open the context menu instead of doing it with a MouseEventMatcher.
Previous Topic:Different Editor for MULTI_EDIT
Next Topic:change active cell
Goto Forum:
  


Current Time: Mon Jul 07 03:14:53 EDT 2025

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

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

Back to the top