Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Customize Outline Search Filter Behavior
Customize Outline Search Filter Behavior [message #1273099] Wed, 19 March 2014 14:03 Go to next message
Hazem ELRAFFIEE is currently offline Hazem ELRAFFIEEFriend
Messages: 61
Registered: September 2012
Member
Is it possible to customize the filter behavior in the outline?

For example, when you write "abc" in the filter, only nodes that their names start with "abc" will be listed. What if I want all nodes that their names contain "abc" to be listed?

What if I even want a more complex strategy?

Is that even possible?
Re: Customize Outline Search Filter Behavior [message #1273149 is a reply to message #1273099] Wed, 19 March 2014 15:56 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 952
Registered: July 2009
Senior Member
It is not possible to customize the content outline search behavior, but Sapphire is reusing JFace FilteredTree for the content outline, so one can achieve contains semantics by adding a leading wildcard, such as "*abc".
Re: Customize Outline Search Filter Behavior [message #1273549 is a reply to message #1273149] Thu, 20 March 2014 06:52 Go to previous messageGo to next message
Hazem ELRAFFIEE is currently offline Hazem ELRAFFIEEFriend
Messages: 61
Registered: September 2012
Member
Don't you think it might be useful to add a new kind of services, called for example "FindingService"?

I can think of it as taking a String (the text in the search area), and returning a Boolean (whether or not the Node associated with this element should be listed).

What do you think?
Re: Customize Outline Search Filter Behavior [message #1273876 is a reply to message #1273549] Thu, 20 March 2014 17:24 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 952
Registered: July 2009
Senior Member
A big issue with this is that allowing filtering behavior to be customized means not being able to reuse FilteredTree from JFace. Re-implementing this functionality would be a lot of work. There could also be a usability problem if different editors implemented filtering differently and user would have no way of determining how filtering works in a particular editor.
Previous Topic:Sapphire 8 : Outline Decorations
Next Topic:Make whole editor read-only
Goto Forum:
  


Current Time: Fri Nov 28 11:18:12 GMT 2014

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

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