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

fix: dataflow links work across files [IDE-391] #550

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

teodora-sandu
Copy link
Contributor

Description

The change in this PR is to load the virtual file from the filePath in the component instead of using the provided virtual file. This way we can navigate to lines in other files that are not the originating file of the issue.

There are some linting changes too, after configuring the default linter in IntelliJ to format on save.

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

Screenshots / GIFs

Screen.Recording.2024-06-14.at.16.41.58.mov

@teodora-sandu teodora-sandu requested a review from a team as a code owner June 14, 2024 15:49
Comment on lines 29 to 32
val virtualFile =
VirtualFileManager.getInstance().findFileByNioPath(Paths.get(filePath))
?: return JBCefJSQuery.Response("error")

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a chance to pre-calculate the VirtualFile? IntelliJ doesn't like to do this kind of thing in the UI thread and will log a warning/error if it takes too long.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, I think I did that in cbe9859. Basically just pre-computing the virtual files before building the query used by the UI

@teodora-sandu teodora-sandu force-pushed the fix/dataflow-links-files branch from 90912c2 to b5fa11d Compare June 17, 2024 14:24
@teodora-sandu teodora-sandu force-pushed the fix/dataflow-links-files branch from b5fa11d to cbe9859 Compare June 17, 2024 14:34
@teodora-sandu teodora-sandu merged commit 2581e2d into master Jun 17, 2024
9 checks passed
@teodora-sandu teodora-sandu deleted the fix/dataflow-links-files branch June 17, 2024 14:43
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

Successfully merging this pull request may close these issues.

2 participants