-
Notifications
You must be signed in to change notification settings - Fork 408
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
Automatically add Protobuf output source directories to classpath #2189
Conversation
...eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/GradleProjectImporter.java
Show resolved
Hide resolved
I just append a new commit to make the default value of protobuf support false at server side, which means only the client explicitly set that preference to true will the server side do the enhancement. |
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.
Overall, I think this is fine. I just noticed a few things in the storage of the init script worth addressing.
...eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/GradleProjectImporter.java
Outdated
Show resolved
Hide resolved
...eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/GradleProjectImporter.java
Outdated
Show resolved
Hide resolved
...eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/managers/GradleProjectImporter.java
Outdated
Show resolved
Hide resolved
Feel free to squash & merge when ready. If you use the top commit, don't forget to fix the typo, |
A Gradle init script is added as a patch to automatically add Protobuf output source directories to classpath. The script works for Gradle 'com.google.protobuf' plugin 0.8.4 or higher. The init script will be extracted to a cache folder. As a side effect, the Protobuf output source directories will be created beforehand, due to an issue of Buildship. See: eclipse-buildship/buildship#1196. Signed-off-by: sheche <[email protected]>
A Gradle init script is added as a patch to automatically add Protobuf
output source directories to clsspath. The script works for Gradle
'com.google.protobuf' plugin 0.8.4 or higher.
The init script will be extracted as a sibling file of the bundle jars.
As a side effect, the Protobuf output source directories will be created
beforehand, due to an issue of Buildship.
See: eclipse-buildship/buildship#1196.
Related issues
This should mitigate some complains about protobuf support:
I also raised a PR at the protobuf plugin repo to support Eclipse classpath: google/protobuf-gradle-plugin#596.
How to test this PR
retrofit-converters/protobuf
's .classpath file../gradlew generateTestProto
, those type not found errors disappear.requires: redhat-developer/vscode-java#2629
Signed-off-by: sheche [email protected]