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: Rename file doesn't send didClose / didOpen LSP notification #1153

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Sep 8, 2023

Rename file doesn't send didClose / didOpen LSP notification

Fixes #1097
Fixes #836

@fbricon fbricon changed the title fix: java.lang.Throwable: Can't remove document listener (com.redhat.devtools.intellij.lsp4ij.DocumentContentSynchronizer@3659a98f). Registered listeners: [com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl fix: change document listener registration to avoid exception after file change Sep 9, 2023
@fbricon
Copy link
Contributor

fbricon commented Sep 9, 2023

@angelozerr please match the commit message to the new PR title

@angelozerr angelozerr changed the title fix: change document listener registration to avoid exception after file change fix: rename file should send didClose / didOpen LSP notification Sep 10, 2023
@angelozerr angelozerr changed the title fix: rename file should send didClose / didOpen LSP notification fix: rename file doesn't send didClose / didOpen LSP notification Sep 10, 2023
@angelozerr angelozerr changed the title fix: rename file doesn't send didClose / didOpen LSP notification fix: Rename file doesn't send didClose / didOpen LSP notification Sep 10, 2023
@angelozerr
Copy link
Contributor Author

@angelozerr please match the commit message to the new PR title

I did that but rename the title with Rename file doesn't send didClose / didOpen LSP notification

@angelozerr angelozerr force-pushed the rename-file2 branch 2 times, most recently from 8bcecff to 9ad6171 Compare September 12, 2023 07:10
@angelozerr angelozerr marked this pull request as ready for review September 12, 2023 07:12
@fbricon
Copy link
Contributor

fbricon commented Sep 12, 2023

Works beautifully. You can merge after fixing that one minor thing

@angelozerr angelozerr merged commit 349e806 into redhat-developer:main Sep 12, 2023
10 checks passed
@sonarcloud
Copy link

sonarcloud bot commented Sep 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@angelozerr
Copy link
Contributor Author

Thanks @fbricon for your review!

@angelozerr
Copy link
Contributor Author

angelozerr commented Sep 12, 2023

@gastaldi I think this PR should fix all your problems that you had when you switch to another branch.

Once you will test it, please give us feedback.

@angelozerr
Copy link
Contributor Author

angelozerr commented Sep 12, 2023

More this PR doesn't send a didSave event every time you type something in the editor. In the Java editor with MicroProfile LS, it revalidates all Java files every time there is a didSave. Now didSave is only called when you do Ctrl+S and not when you are typing something, which avoid revalidating each time all opened Java editors, which is very good for performance.

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