Support columns in annotations and expose path merging algorithm #167
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.
Artemis seems to only support annotating an entire line. For grading, it is useful to support highlighting parts of a line.
For example, given this code and two annotations:
intelligrade would highlight everything in that line, even though it could just highlight the identifier and the magic number. The autograder already exposes the column information.
This PR closes #158.
In addition to that, it closes #163.
The formatting of paths
I implemented this code in multiple codebases now, mainly intelligrade and this library share similar code. That is why I decided to write a more refined version in artemis4j that can then be used in intelligrade as well.
After about 20 hours of work later, we end up with the code in this pull request. Here are some things I am not happy with yet, but not sure what to do instead:
utils
package a good location? Where should those classes be?LocationMergingPathFormatter
LocationMergingPathFormatter
class is questionable. I think it should work correctly, but I am not sureAs a side-note: Lines are 0-indexed and not 1-indexed. That is so confusing, and nobody even noticed that the annotation merging code assumed they were 1-indexed. The bug is now fixed, but this should be checked in intelligrade.