Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [CNF] Using CNF, SelectionProvider and property testers
[CNF] Using CNF, SelectionProvider and property testers [message #506309] Wed, 06 January 2010 17:05 Go to next message
kaab  is currently offline kaab
Messages: 43
Registered: July 2009

We are using CNF in one of our views, the view is populated using different contributors. Due to some internal requirements, we need to wrap objects that are displayed in this view.
In order for our handlers to take actions, they need unwrapped objects which are made available by a selection provider defined on the ViewSite (we're following the same approach that emf.edit uses for dealing with wrapped objects).
This mechanism works well when used along with a ViewPart.
When used with a view extending CommonNavigator and setting the selection provider, none of our propery testers get fired.
I have narrowed down the problem to a small project that you can get from : html
MD5: 9973F3E870E35DB63869F6513B42F80

The project is a CNF view showing EMF content.
It's populated using a small model, that has 2 customers, one that has a purchase order (Customer2) and one that does not have any (Customer1).
The project contains a property tester that would test if a customer has a purchase thus enabling the empty command.
When the selection provider is not set, the property tester gets called and the handler would be enabled for Customer2 and disabled for Customer1 as it should.
When setting the selection provider is set, the property tester is not called and thus none of the actions would be enabled.

Any help or pointers would be greatly appreciated,

Re: [CNF] Using CNF, SelectionProvider and property testers [message #508599 is a reply to message #506309] Tue, 19 January 2010 15:22 Go to previous message
kaab  is currently offline kaab
Messages: 43
Registered: July 2009
Responding to my own stupidity here.
The property testers were not fired because they were defined on a TreeSelection and the SelectionProvider returned a StructuredSelection.
Sorry for the non-relevant post.
Previous Topic:Customizing Traverse-keys for ColumnViewerEditor
Next Topic:Exception handling in databinding
Goto Forum:

Current Time: Thu Oct 23 09:31:04 GMT 2014

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

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