scijava / scijava-search

Search framework for SciJava applications :mag:
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

Provide a Searcher for script templates #1

Closed imagejan closed 6 years ago

imagejan commented 6 years ago

In addition to snippets, it might be useful to be able to search all available script templates and open them in the script editor.

See also https://github.com/scijava/script-editor/issues/6.

imagejan commented 6 years ago

I've made a first attempt implementing this on the add-template-search branch.

Remaining tasks:

On the other hand, maybe this whole search module should actually live in the script-editor repo? Opinions, @ctrueden, @stelfrich?

stelfrich commented 6 years ago

On the other hand, maybe this whole search module should actually live in the script-editor repo?

That's a philosophical question, I guess. Templates, in general, are independent of the script-editor component. If script-editor is not available, there's not really that much you can do with the search result, right? However, you should still be able to get template search results, even if you can't take any action on them in the previous case.

What about keeping TemplateSearchResult and TemplateSearcher in here and moving OpenTemplateSearchActionFactory to script-editor? We don't have an example for that kind of separation at the moment, but generating search results and providing an action could be separated.

imagejan commented 6 years ago

Thanks, @stelfrich, for the advice. I wasn't aware that the "Source" and "Help" SearchActionFactory classes already live in imagej-legacy.

I now moved OpenTemplateSearchActionFactory to imagej-legacy in https://github.com/imagej/imagej-legacy/pull/181.