Therapi-based Discovery#44
Merged
Merged
Conversation
6dd64d8 to
347e3be
Compare
Member
Author
|
Note: This is the first step towards completing scijava/scijava#56 |
347e3be to
b6ece7b
Compare
This was referenced Nov 15, 2021
b6ece7b to
fb7d30c
Compare
This commit provides major changes to the Discoverer interface. 1. We rename implementingClasses to implsOfType 2. We add the elementsTaggedWith(String key) method 3. We make both elements default, so that Discoverers can decide to implement only one of the two methods.
This commit also refactors the OpInfo implementations to prevent them from definning the Hints and priority. We might want to define these using something other than an annotation...
fb7d30c to
e303bc5
Compare
e303bc5 to
d0d8479
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a Therapi-based Op Discovery mechanism via the new
scijava/scijava-discovery-therapimodule. This module enables "element-tagged" discovery through the use of the@implNotejavadoc tag.How do I declare an Op using Therapi?
@implNoteto anyClass,MethodorField. The@implNoteannotation should be followed with (1) the tag type (i.e. the keyword under which thisAnnotatedElementwill become discoverable) and (2) any (comma-delineated) key-value pairs that should be scraped with the tag.Note that the tags are parsed using Parsington, as the
org.scijava.parsepackage from SciJava Common was moved into the incubator and modularized into SciJava Parse2.An Op written as a
Fielddiscoverable using therapi might look like:Ops written as
Methods require atypeoption:This PR also refactors the
DiscovererandDiscoveryAPI from SciJava Discovery to make the discovery returns much more powerful.Furthermore, this PR also introduces SciJava Parse2 to the incubator, partitioning out
org/scijava/parsefrom SciJava Common.Closes scijava/scijava#77