Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » FilteredSelectionDialog - Internal ContentProvider does not see model changes
FilteredSelectionDialog - Internal ContentProvider does not see model changes [message #675806] Wed, 01 June 2011 15:15
Niels Hoffmann is currently offline Niels HoffmannFriend
Messages: 2
Registered: July 2009
Junior Member
FilteredSelectionDialog's internal ContentProvider does some tricky caching of model data to make sure it runs with high performance.

This works for most use cases as the model is not likely to change during the dialogs life time.
In my use case however, I want to change the model while the dialog is open.

Unfortunately, all the clever caching prevents the content provider from knowing that the model has changed.

The problem for me is, that the internal ContentProvider remembers the content of the last completed filter run in a field lastCompletedFilter and will not refresh its internal model until "?" gets entered as the search pattern.

In order to circumvent the problem I am using reflection to set the lastCompletedFilter to null, manually and that works.

I am aware, that this is a hack, but the FilteredSelectionDialog API does not offer a convenient
way to solve the problem or at least I was not able to see it.

Am I missing something? Is there a right way to do this?

Previous Topic:[Databinding] Master/Detail Validation Error
Next Topic:Showing an Image while the section is being regenerated in the Background
Goto Forum:

Current Time: Wed Apr 25 01:21:14 GMT 2018

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

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