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 several changes to improve the current state of the outline for multiple Java pieces of code. This will not only be reflected in the outline panel, but also in the buffer symbols, which in my case, is what I prefer to navigate across all the symbols in the current file. At the beginning, my motivation was to solve an issue related to how the methods were appearing in the sticky scroll, but this led me a rabbit hole where I discovered that a lot more was missing in the outline, namely the following:
Things that didn't appear in the outline before:
class,interface,enum,recordandannotation(even if nested) that had no modifiers (access and non-access).And lastly, these changes have as consequence also the fixing of an issue related to the sticky scroll. The purpose of the sticky scroll is to give you context about the class and the method you are currently in, which can be very useful in multiple scenarios. However, there was an issue that when a method or class had an annotation, that annotation would appear in the sticky scroll instead of the whole method declaration, defeating the purpose of the sticky scroll.
This feature was recently introduced and can be enabled in
settings.json:Limitations I found:
record_declarationmarked as@item, but marking the entirerecord_declarationas@itemcauses the sticky scroll to show the annotation (because it includes the entire text range starting with any annotation that is present).Before:
before.mov
Now:
now.mov