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 11:15
Niels Hoffmann is currently offline Niels Hoffmann
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?

Niels
Previous Topic:Opening a multi-page forms editor on a specific page and section
Next Topic:[Databinding] Master/Detail Validation Error
Goto Forum:
  


Current Time: Thu Jul 31 11:45:57 EDT 2014

Powered by FUDForum. Page generated in 0.02223 seconds