Currently, The Diagnostics API (what highlights the code in the editor) and the TreeView are constructed separately within the extension. This means that JSON parsing is done separately, twice, to build the two separate things.
Ideally, the TreeView should be a visual representation of what is already in the Diagnostics. The flow should look like this:
Parse the JSON
Build the Diagnostics and pass to API
Retrieve diagnostics and build the TreeView from it.
This way, when we build more intelligent "watching" in aderyn, clearing the diagnostics has the benefit of also clearing the TreeView.
Currently, The Diagnostics API (what highlights the code in the editor) and the TreeView are constructed separately within the extension. This means that JSON parsing is done separately, twice, to build the two separate things.
Ideally, the TreeView should be a visual representation of what is already in the Diagnostics. The flow should look like this:
This way, when we build more intelligent "watching" in aderyn, clearing the diagnostics has the benefit of also clearing the TreeView.