use full class name as ID of a tag #242
Merged
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.
In our project we use very many tags, and we order them in hierarchies and with inner classes. Sometimes inner classes have the same names (as they are the leaves of our tree). This is currently not supported by JGiven, as it uses the class' simpleName to index the tags. I know that this is to some extent documented in @istag#name - but it seems to be a bit outdated as it talks about "type name".
This tries to introduce the full class name to derive the IDs of the tags, while preserving the existing functionality to use the simple name as the default name of the tag. The ID will only be used for the internal indexing, and will not be shown to the user.
I've tested this with the HTML5 report and it works for me AFAICS. Let me know what you think - I wonder if it breaks functionality or (too much) backwards compatibility.
In addition to this the ...#/tag/name navigation used in the HTML5 report should use something like ...#/tagid/id to uniquely identify tags not by their name, but by their ID. I'll look into this once we agree on the Java code.