Open kburtram opened 3 years ago
Mid-progress report: The code changes I've made are for VS Code's codebase, so nothing to check in for this repository. But current changes I've made so far includes:
Currently working on:
But I do have something to demo for this area at the very least, and we can show it with multiple languages.
Screenshot of what it looks like in JavaScript:
(This was actually only like two lines of code to implement so far, but it's a new codebase for me so ramping up takes a while. :/ )
Completed
Okay, I kind of have the Function List implementation down:
It's under a shortcut key "Ctrl + Alt + F" when you focus on the Outline pane, such that it'll toggle between show all elements and just the functions and methods and constructors. Since JavaScript may have multiple classes and interfaces in a single file, which isn't a design that's common in C#, I decided to include classes and interfaces in the Function List as well for context.
But also because the way the Outline pane is implemented as a tree, if the class and interfaces aren't included, the children elements won't be included either. And I'm not sure if I should add another feature to allow the tree view to flatten as a list, because I feel like I'm adding more and more features and scope creep.
Ignore all of the errors. I took a random file from VS Code and used it as a test file, so obviously, none of the code works.
Also, I think this screenshot has everything ordered by Name, rather than Position, hence the non-linear ordering of the Outline elements relative to the file. This is a configurable setting for the Outline tree, so don't worry about this.
Currently the Function List implementation for the VSCode extension only supports C# based on the VS extension implementation. Ideally the feature could also work for other languages, possibly reusing metadata available in the VSCode Code Outline feature.