Re: Redesign of the Search module
Petr Jiricka <[email protected]> Thu, 16 Oct 2003 16:01:01 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Marian Petras wrote: > Petr Jiricka wrote: > >> ... >> >> I have questions rather than comments: >> >> Will there still be the "Find" action on every node by default? Will >> modules that provide nodes need to do something to get this action on >> their nodes? > > > Yes, it will be on every node by default. Only modules that want to > override the default behaviour will need to provide information how to > search the node. > > >> Will every module that provides a node in the Logical view need to do >> something special for Search? Will modules have to specify how a >> particular node will be searched, or will there be some default >> behavior, so that the module does not have to do anything? > > > There will be a default behaviour: If the node to be searched doesn't > provide any special instructions (i.e. no FileSearchRequest), its > subnodes are searched recursively. If at least one child returns a > non-empty search result, a search result group is created for the node > to be searched and the children's search results are put into it. > > >> What are the use cases for using the search request API? What are the >> situations when a module will want to do new >> FileSearchRequest(myFileSet)? > > > The module will need to provide search requests if and only if it > wants to override the default behaviour. > Thanks, this answers my questions. It may be useful to add explicitly state these things in the spec. Regarding overriding the default behavior: Your document uses an example with the Sources and Packages nodes and the individual package nodes and the Java file nodes, and how modules can register the search capability for the individual nodes. However, in this case, wouldn't the default behavior provide the correct results? Is't the mechanism when nodes delegate recursively to subnodes be sufficient in this scenario? Can you think of other examples of when it is necessary or desirable to override the default behavior? I can't really think of any. Thanks Petr > > Marian > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >