|[CNF] Using CNF, SelectionProvider and property testers [message #506309]
||Wed, 06 January 2010 17:05
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 :
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,
Powered by FUDForum
. Page generated in 0.02477 seconds