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 converter allows to get a
ResultsTable
by its title string. In addition, thepopulateInputCandidates()
method allows to get a list of open results tables, e.g. to generate a choice dropdown inObjectWidget
.Since we're using ImageJ1 classes directly, we need to add the new converter class to the exceptions in
ImageJ1EncapsulationTest
.See also this forum discussion.
To be discussed:
It would be nice to extend the functionality to also allow loading
ResultsTable
s from files, using the staticResultsTable.open(String path)
method (possibly delegating to a newFileToResultsTableConverter
). I'll leave this to a future pull request.The current implementation of
ObjectWidget
andObjectService#getName()
returns theResultsTable
'stoString()
value, resulting in a rather cryptic identifier in the dropdown choice:We could create a custom widget for
ResultsTable
, but I'd prefer usingObjectWidget
to keep everything concise (and staying with a converter has the added benefit that#@
parameters are callable from CLI/macros right away). Maybe we can improveObjectService
somehow to be extensible via a (new)NameProvider
plugin mechanism, but I'm not sure if this would be overdoing it? @ctrueden do you have some opinion/advice here?Tests for the new converter are currently missing.