-
Notifications
You must be signed in to change notification settings - Fork 275
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
Add eclipse support #590
Add eclipse support #590
Conversation
8ce4927
to
53c1d08
Compare
I leave IDESupportTest with fail. It's expected behaviour for now. Open questions:
|
Does Gradle vanilla API support a limit set of the attributes? Or no attributes are supported at all?
This is the purpose of the attributes If the folder does not included in the .classpath file, after user compiles the proto files to Java sources, user needs to reload the project to update the .classpath file, otherwise, there will still be a lot of compilation errors displayed. That might not be ideal as it's not out-of-box experience - user might not be aware that such action is needed to make it work. |
As i know - not supported to add any attributes. All required attributes will be set automatically.
You are right. Look like we need to keep custom logic for eclipse and idea. @jdneo |
It's generated automatically when user is importing a Gradle project in Eclipse. There is a plug-in in Eclipse called Buildship, this plugin is used to parse the Gradle project to an Eclipse project (just like when we import a Maven or Gradle project into IDEA, IDEA will try to understand the project and parse it into IDEA's own model). The .classpath file is generated when Buildship is doing the import stuff. |
I moved the eclipse fix to this PR for the reason that registering the sourceset should fix the issue. Sourceset registration actually solves the problem, but not in the best way for the user experience. IDEA works well without custom code from the gradle idea plugin. Eclipse doesn't work perfectly without custom code from eclipse gradle plugin. I think the best solution will be keep custom code for eclipse. @jdneo How do you feel better, will you merge #596 or will we leave these changes in this PR? |
25d8e52
to
5ddc6bf
Compare
- add the generated source folders to Eclipse classpath entries. Due to a limition of Buildship, we have to create those folders beforehand, see: eclipse-buildship/buildship#1196 Signed-off-by: sheche <[email protected]>
Signed-off-by: sheche <[email protected]>
Signed-off-by: Sheng Chen <[email protected]>
5ddc6bf
to
aee696c
Compare
aee696c
to
0bc669b
Compare
I keep for now idea custom code. @jdneo I fix lint problems, and move IDE support tests to separate file. All other changes is yours. Remove draft status. |
@jdneo Could you review this PR? |
Thank you @rougsig, I'll review it today. |
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.
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.
Sourceset registration actually solves the problem, but not in the best way for the user experience. ... Eclipse doesn't work perfectly without custom code from eclipse gradle plugin.
What is wrong with Eclipse support when we don't have the custom code? What is wrong with having code that just creates the directories, and nothing else?
3e845f7
to
656541a
Compare
656541a
to
3649cd8
Compare
More details here #596