-
Notifications
You must be signed in to change notification settings - Fork 870
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
Eclipse plugin v1.15.0 thows exception in 2022-03 #779
Comments
I have the same Problem... |
It should not be
|
It looks like the root of this issue is: google-java-format/core/src/main/java/com/google/googlejavaformat/java/JavaInput.java Line 37 in 27670be
|
I have the same problem with: To be able to use the plugin in Eclipse I downgraded to tag v1.11.0 [https://github.com/google/google-java-format/releases/tag/v1.11.0], and make sure in eclipse.ini you are pointing to java 11. |
Same here, with v1.15.0. Any updates? Workaround. Environment (default eclipse install; using the new installer) eclipse.buildId=4.26.0.20221201-1200 |
For me as well, version 1.13.0 works but 1.15.0 does not on Eclipse with Java 17 even though I have the flags in
Note that testing this is a little bit tricky due to #744 (comment). |
Same Issue with IntelliJ I only have the following VM options: --add-opens=java.base/java.lang=ALL-UNNAMED Clearly the above does not prevent the issue. I will now try the list as from @PhillippWendler to see if that improves things... Version info:
Stacktrace of course a bit different:
|
Current versions of the plugin (e.g., 1.18.1) work fine for me in Eclipse with Java 17. |
Which version of Eclipse are you running? I am still facing the error with the latest version (1.18.1) of the plugin (stack trace copied below). Here is my Session data :
Click here to see stack trace
|
Do you have the additional options in |
I tried with and without the additional As a temporary measure, I imported the configuration provided here. |
Following patch worked for me in Eclipse 2023-09 and Google Code Formatter plugin version 1.18.1: --- eclipse.ini.orig 2023-11-10 11:18:04.869314018 +0100
+++ eclipse.ini 2023-11-10 11:19:54.089686706 +0100
@@ -27,3 +27,16 @@
-Declipse.p2.max.threads=10
-Doomph.update.url=https://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/
+--add-opens=java.base/java.lang=ALL-UNNAMED
+--add-opens=java.base/java.util=ALL-UNNAMED
+--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
+--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
+--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED I wonder why this wasn't added to the installation instruction already a long time ago? Similar information is contained in the IntelliJ setup instructions (even though there less whitelisting seems to suffice...) |
With the eclipse plugin 1.15.0 (named 1.13.0 on the releases page) the following exception is generated every time the formatter is executed or selected.
I've added the following to my
eclipse.ini
to no avail:The text was updated successfully, but these errors were encountered: