Closed AaronBallman closed 3 years ago
At the moment the parser is only searching for locations inside a struct declaration. I am not checking for the typenames at initialization point ( just for simplicity to have the extension up and running as fast as possible). Sadly, as you described, templated declarations have unknown types when declared.
I agree there is a lot of value in also picking up the type at initialization points.
The workaround for now would be to create a dummy struct with the templated instance inside. ( not great )
Just submitted version 0.3.4 which makes the parser also work if the position fetched is a Variable declaration.
I hope this helps in your use cases.
Thank you for the quick fix, I can confirm it works well for me in my testing!
Perhaps I'm misusing the extension, but when I have a templated structure type, the vizualizer cannot find a structure at that location (likely because it's a templated class and not an instantiation). Consider:
Clicking on the structure name itself and trying to visualize yields "No structure found at the given location" for both of those examples (even though the template isn't even used in the definition of
U
). Perhaps it would make sense to allow visualizing the structure from a declaration? e.g.,