Justification
I consider the unit test annotation '@TestMethod("FooBar") to be part of the test.
Description
Have annotations included as part of selection. When double clicking a test in Test Explorer to navigate to it, the annotation should be included along with the code.
Actually it might be useful to extend that to any annotated context that we can navigate to.
@Vogel612 I would agree, but there are thorny edge cases...
'@Ignore MultipleDeclarations
Dim foo As Long, bar As Integer '<~ now navigate to bar
Navigation currently selects its target - that's how navigating to a variable's declaration highlights it... it's also why navigating to a test method highlights the whole thing...
I think navigating to a procedure (or test method) shouldn't select anything - merely, just move the caret inside the procedure scope. Thoughts?
I think simply moving the caret is the ideal solution and more in line with what we expect from a navigation.
That鈥檚 what Visual Studio does.
@rubberduck203 yeah. thinking we should just do exactly that.
Selecting bar (in the example above) makes it easier to quickly find where you are when you've navigated and jumped to a whole new screen full of text. Just the blinking cursor can be harder to find when you're not exactly sure _where_ in that screen you should be looking.
In that respect, I'd vote for selecting the targeted "word". When navigating to a procedure, it wouldn't hurt to select the Foo in Private Function Foo() as Bar, but I'd think that selecting the whole Function would be overkill.
Most helpful comment
Navigation currently selects its target - that's how navigating to a variable's declaration highlights it... it's also why navigating to a test method highlights the whole thing...
I think navigating to a procedure (or test method) shouldn't select anything - merely, just move the caret inside the procedure scope. Thoughts?