Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only function names without directed segments #5

Open
forgetsuffering opened this issue May 26, 2023 · 10 comments
Open

Only function names without directed segments #5

forgetsuffering opened this issue May 26, 2023 · 10 comments

Comments

@forgetsuffering
Copy link

I have tried this plug-in several times with different java projects, and the generated results are only the functions in the project, and there is no calling relationship between functions, that is, directed line segments.I'm desperate to know what's causing this.
Uploading pic.PNG…

@chanhx
Copy link
Owner

chanhx commented May 26, 2023

What extensions for Java do you have? I have the "Extension Pack for Java" installed in my VS Code, and the calling relationships are shown on the call graph.

Crabviz utilizes the "call hierarchy" capability of LSP server to get the calling relationships, so maybe you should check if "call hierarchy" for Java is supported in your VS Code. Just right click on the name of a Java function, and see if there is a "Show Call Hierarchy" option in the context menu.

@forgetsuffering
Copy link
Author

What extensions for Java do you have? I have the "Extension Pack for Java" installed in my VS Code, and the calling relationships are shown on the call graph.

Crabviz utilizes the "call hierarchy" capability of LSP server to get the calling relationships, so maybe you should check if "call hierarchy" for Java is supported in your VS Code. Just right click on the name of a Java function, and see if there is a "Show Call Hierarchy" option in the context menu.

Ok, thank you. By the way, do I need to compile the project before using this function.

@chanhx
Copy link
Owner

chanhx commented May 26, 2023

do I need to compile the project before using this function.

No, you don't need to compile it.

@chanhx
Copy link
Owner

chanhx commented Jun 3, 2023

I came across this issue recently. It seems to happen when you open a new project, and run Crabviz without any tabs open (the language server has not started). I just rerun the command after waiting a few seconds in that case, and then I got the result as expected. Maybe you can try it again if no edges are shown in the result.

The response of vscode.prepareCallHierarchy is an empty array in the above case, not much info to tell whether the language server is ready or not, so there is no retry logic currently. But I think maybe we can track whether all responses are empty, and retry several times before getting non-empty response. I will try it later.

@corn27
Copy link

corn27 commented Sep 29, 2024

What extensions for Java do you have? I have the "Extension Pack for Java" installed in my VS Code, and the calling relationships are shown on the call graph.

Crabviz utilizes the "call hierarchy" capability of LSP server to get the calling relationships, so maybe you should check if "call hierarchy" for Java is supported in your VS Code. Just right click on the name of a Java function, and see if there is a "Show Call Hierarchy" option in the context menu.

First of all, thank you very much for Crabviz! I have "Show Call Hierarchy" and it works, but Crabviz only shows modules, not call curves. I'm running vscode on a remote aarch64 server on a local win. It is worth noting that Crabviz was normal before. @chanhx

@chanhx
Copy link
Owner

chanhx commented Sep 29, 2024

I'm running vscode on a remote aarch64 server on a local win.

Seems there are some problems with remote development, I'll look into it later.

@corn27
Copy link

corn27 commented Sep 29, 2024

Thank you@chanhx . Here are some clarifications:

  • The version of Crabviz is 0.4.0.
  • C/C++ is used in the remote server.
  • The "Call Hierarchy" works.
  • And everything worked the first time I used it, the vanishing curve happened today.

@chanhx
Copy link
Owner

chanhx commented Sep 29, 2024

Thank you@chanhx . Here are some clarifications:

  • The version of Crabviz is 0.4.0.
  • C/C++ is used in the remote server.
  • The "Call Hierarchy" works.
  • And everything worked the first time I used it, the vanishing curve happened today.

Thank you very much for providing the information.

Did you connect the remote server the first time you used the extension?

@corn27
Copy link

corn27 commented Sep 29, 2024

Did you connect the remote server the first time you used the extension?

Yes, the first time, I connect the remote server and install Crabviz on it. I have been using it this way until today. But I didn't use Crabviz last week.

@chanhx
Copy link
Owner

chanhx commented Sep 29, 2024

I have been using it this way until today. But I didn't use Crabviz last week.

don't have a clue now, I need to look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants