-
Notifications
You must be signed in to change notification settings - Fork 107
Avoid closing preview panel when file switching #520
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
Conversation
Hi! What happens when you switch away from a grammar file though? Does it still show the preview? I think I remember that causing all sorts of issues because events are sent but we don't have a visible grammar to pull data from. |
ping @OlivierCavadenti |
@@ -278,11 +278,9 @@ public void currentEditorFileChangedEvent(VirtualFile oldFile, VirtualFile newFi | |||
} | |||
if ( newFile.getName().endsWith(".g") ) { | |||
LOG.info("currentEditorFileChangedEvent ANTLR 4 cannot handle .g files, only .g4"); | |||
hidePreview(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should leave this one in. I can fix.
It works well, actually! I can replicate easilly, but @OlivierCavadenti could you update your commit to use git |
5aa8eb1
to
4175381
Compare
Hi, I just do it now, sorry for the delay by the way. |
Hi! I think it's still has an issue with the "signature" on the commit: https://github.com/antlr/intellij-plugin-v4/pull/520/checks?check_run_id=6238810717 |
It's only one line and I can make the change if you want in my fork but I thought it would be good to give you credit for the PR :) |
When we switch files with ANTLR4 preview panel opened, it's closed. Now with this commit, we never close preview panel. Each grammar have his preview conserved. Signed-off-by: Olivier Cavadenti <[email protected]>
Signed-off-by: Olivier Cavadenti <[email protected]>
008078e
to
85613b1
Compare
awesome. thanks! |
When we switch files with ANTLR4 preview panel, it's closed.
Now with this commit, we never close preview panel.
Each grammar have his preview conserved.
I keep it very simple (only remove hide previews calls), say me if we need more complex logic.
Resolve #409