You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear author,
I installed the crabviz extension and I think it very useful for quickly reading code. It shows the graph clearly in a webview.
And I tried clicking the function node, but it seems that the extension doesn't offer the capability to jump to the location where the function node locates in source code. I want to enhance the extension.
I downloaded and browsed the source code of Crabviz VSCode extension. I come up with an idea.
The element in the graph of webview is "svg", so, I think if we add "file-location" attribute and "line-location" attribute, when user double click the svg of a function node, the webview could post a message containing the location info to the crabivz extension. And then crabviz extension could jump to the location using “vscode.workspace.openTextDocument”.
I encountered a problem that, I just couldn't find where you generate these svg and how to add the "file-location" attribute and "line-location" attribute to it,could you please help me figure out? Thank a lot!
The text was updated successfully, but these errors were encountered:
I’m glad it’s useful for you. Actually, I was working on this feature a few months ago (branch vscode-0.5.0), but the development was suspended due to other matters. In my approach, I add a bar on top of the call graph, so that we can perform operations there, like exporting the call graph, zooming in or out, searching symbols and jumping to definition. If a function is selected, its name will shown on the bar, and we can click a button on the bar to jump to definition. I had considered about double-clicking, but I think it’s not as noticeable as the top bar approach, users may not be aware of this feature until they double-click a function.
I encountered a problem that, I just couldn't find where you generate these svg and how to add the "file-location" attribute and "line-location" attribute to it,could you please help me figure out? Thank a lot!
I generate SVGs with the @viz-js/viz package. Firstly, I generate the dot string, and then pass it to viz to generate the SVG, and then modify the SVG to add some classes and ids. And actually in branch vscode-0.5.0, all the information you need is in the SVG. The file path is stored in the path attribute, and the cell id is consisted of the number of line and the number of column.
The development has resumed this month, but the progress is a bit slow because it involves some refactoring and new UI development.
Dear author,
I installed the crabviz extension and I think it very useful for quickly reading code. It shows the graph clearly in a webview.
And I tried clicking the function node, but it seems that the extension doesn't offer the capability to jump to the location where the function node locates in source code. I want to enhance the extension.
I downloaded and browsed the source code of Crabviz VSCode extension. I come up with an idea.
The element in the graph of webview is "svg", so, I think if we add "file-location" attribute and "line-location" attribute, when user double click the svg of a function node, the webview could post a message containing the location info to the crabivz extension. And then crabviz extension could jump to the location using “vscode.workspace.openTextDocument”.
I encountered a problem that, I just couldn't find where you generate these svg and how to add the "file-location" attribute and "line-location" attribute to it,could you please help me figure out? Thank a lot!
The text was updated successfully, but these errors were encountered: