Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » [JFace Viewers] Coordinate content provider and viewer filters
[JFace Viewers] Coordinate content provider and viewer filters [message #328289] Tue, 20 May 2008 14:23 Go to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

While implementing ITreeContentProvider.hasChildren() I've realized that
there seems to be a gap in the coordination with the ViewerFilters that
have been set on the viewer. In my hasChildren() I can return true if
the model has children, but the filters on the viewer might actually
filter those children out. The result is that the tree gets bogus +
signs next to some nodes because hasChildren() returned true but when
the viewer tries to expand them (in response to the user clicking), they
are empty because the children were all filtered by the ViewerFilter.

Am I missing some framework-supported way to coordinate the two?
Certainly I shouldn't have to embed knowledge of the filters into the
content provider - that would seem to defeat the whole design of
separating the model from the view components.

Any help appreciated,
Eric
Re: [JFace Viewers] Coordinate content provider and viewer filters [message #328290 is a reply to message #328289] Tue, 20 May 2008 15:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Eric,

I complained about this as well and suggested that when filters are
applied that getChildren be called instead along with filtering to
determine if more than zero children remain. It was suggested that this
would hurt performance, and then someone else suggested it could be made
optional. I can't recall if I opened a bugzilla or not. I don't think
I did...


Eric Rizzo wrote:
> While implementing ITreeContentProvider.hasChildren() I've realized
> that there seems to be a gap in the coordination with the
> ViewerFilters that have been set on the viewer. In my hasChildren() I
> can return true if the model has children, but the filters on the
> viewer might actually filter those children out. The result is that
> the tree gets bogus + signs next to some nodes because hasChildren()
> returned true but when the viewer tries to expand them (in response to
> the user clicking), they are empty because the children were all
> filtered by the ViewerFilter.
>
> Am I missing some framework-supported way to coordinate the two?
> Certainly I shouldn't have to embed knowledge of the filters into the
> content provider - that would seem to defeat the whole design of
> separating the model from the view components.
>
> Any help appreciated,
> Eric
Re: [JFace Viewers] Coordinate content provider and viewer filters [message #328299 is a reply to message #328290] Wed, 21 May 2008 02:16 Go to previous message
Eclipse UserFriend
Yes I was the one suggesting this [1] and the bug was closed as WONTFIX
by Boris. I've reopened and assigned to me so I'll take a look at it in 3.5.

[1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=203950

Ed Merks schrieb:
> Eric,
>
> I complained about this as well and suggested that when filters are
> applied that getChildren be called instead along with filtering to
> determine if more than zero children remain. It was suggested that this
> would hurt performance, and then someone else suggested it could be made
> optional. I can't recall if I opened a bugzilla or not. I don't think
> I did...
>
>
> Eric Rizzo wrote:
>> While implementing ITreeContentProvider.hasChildren() I've realized
>> that there seems to be a gap in the coordination with the
>> ViewerFilters that have been set on the viewer. In my hasChildren() I
>> can return true if the model has children, but the filters on the
>> viewer might actually filter those children out. The result is that
>> the tree gets bogus + signs next to some nodes because hasChildren()
>> returned true but when the viewer tries to expand them (in response to
>> the user clicking), they are empty because the children were all
>> filtered by the ViewerFilter.
>>
>> Am I missing some framework-supported way to coordinate the two?
>> Certainly I shouldn't have to embed knowledge of the filters into the
>> content provider - that would seem to defeat the whole design of
>> separating the model from the view components.
>>
>> Any help appreciated,
>> Eric


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Launch Standalone Eclipse Aplication From Another Eclipse
Next Topic:JSP in Eclipse WebBrowser?
Goto Forum:
  


Current Time: Wed Apr 16 01:08:52 EDT 2025

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

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

Back to the top