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

No rule selected #229

Open
amryounis opened this issue Oct 24, 2023 · 7 comments
Open

No rule selected #229

amryounis opened this issue Oct 24, 2023 · 7 comments

Comments

@amryounis
Copy link

I experience unstable behavior from the extension. once installed the first time, it worked fine. later on, all right click commands for displaying graphs reveal this message "No rule selected".
image

@pvanb
Copy link

pvanb commented Nov 14, 2023

Experiencing the same. It's my first time using this extension so assumed there was something wrong with how I was using it.

@mike-lischke
Copy link
Owner

It's important to place the caret within a rule's text. Then it should work.

@amryounis
Copy link
Author

this behavior cause is inconsistent. sometimes it comes after closing VSCODE and reopening it later.
the only fix i found is to make any edit and save the g4 file. saving with no edit does not fix it

@mike-lischke
Copy link
Owner

To help with issues like this I added a log feature to the extension. So, when you see a problem open the OUTPUT tab in VS Code and switch to the ANTLR4 Output channel. Then paste the content here.

@constantOut
Copy link

Same problem only call graph diagram is built. ANTLR OUTPUT shows this on edit of grammar file:
Running Java with parameters: -jar c:\Users\acc4k.vscode\extensions\mike-lischke.vscode-antlr4-2.4.6\node_modules\antlr4ng-cli\antlr4-4.13.2-SNAPSHOT-complete.jar -message-format antlr -o d:\Projects\BtrQL\src\main\grammar.antlr -no-listener -no-visitor -Xexact-output-dir d:\Projects\BtrQL\src\main\grammar\Grammar.g4

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
java.lang.UnsupportedClassVersionError: org/antlr/v4/Tool has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)

I updated JDK from 21 with GraalVM to 22 and it fixed the issue.

@constantOut
Copy link

BTW, awesome plugin! Thank you very much for you work!

@mike-lischke
Copy link
Owner

Just yesterday I had the same error in a different context and it turned out that the Java version from Oracle uses a smaller class file versions (52). When you install an OpenJDK Java version (at least 20) this issue should be gone.

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

4 participants