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
Update Eclipse configuration & manual chapter #1973
Update Eclipse configuration & manual chapter #1973
Conversation
…f the manual to import the CF projects as gradle projects in eclipse. Also removed are the old `.project` and `.classpath` files in the projects.
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.
Thanks for working on this!
@@ -993,15 +993,21 @@ \subsection{Configure Eclipse to edit the Checker Framework\label{building-eclip | |||
\item Download Eclipse from | |||
the \href{https://www.eclipse.org/downloads/}{official Eclipse website} | |||
and install it. | |||
\item Run Eclipse and set the | |||
workspace to the directory pointed to by \code{\$JSR308}. | |||
\item Run Eclipse. |
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.
One still needs to perform the normal Import Projects
for jsr308-langtools, annotation-tools, etc.
Or how does Eclipse find the source code for these projects?
Can you split these instructions up into the old-style part that will remain as before, and the new part that works for the Gradle projects, which is just the checker-framework
directory.
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.
The Gradle imports configure the CF subprojects to depend on stubparser.jar, AFU.jar, and compiler-2.4.0.jar so they don't directly depend on jsr308-langtools, annotation-tools, etc.
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.
Do these jar files contain source files?
For development it's very helpful to actually see the javadoc for compiler methods.
Also, should the first bullet point be updated? It currently says "clone and build all projects from their sources".
Maybe this should now only clone checker-framework
?
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.
the jars don't contain the source files.
I've updated the set of eclipse project and classpath files instead and cleaned up the manual instructions on what projects to not select.
Hi Jeff @jyluo, I just tried your branch and here are what I got: steps: Fetch CF from Build CF by running Follow the update latex section to import CF, this step I meet two problems:
Any ideas? Is there anything I did wrong? Update: Ok, I found the reason. This PR updates the Update2: Following steps make me successfully import CF related projects into my eclipse:
Then finally all projects build in my eclipse. |
@CharlesZ-Chen can you point the root directory to $JSR308 and then import with the nested project option? Separately importing scene-lib, asmx, and jsr308-langtools should be unnecessary if $JSR308 is selected as the root. As for stubparser/bin and stubparser/bin/bin I'll investigate, but it should be a clean up of those projects, not this import instruction. |
You don't have to re-point those jars if you also import AFU itself as a project, hence setting $JSR308 as the root of the import with nested-project scan to pick up AFU, scene-lib, & asmx. |
Remove junit jar here and file an update to AFU/lib |
… into update_eclipse_editor_chapter
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.
One more question, then we can merge this.
checker-qual/.classpath
Outdated
<attribute name="gradle_used_by_scope" value="compatQual"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="build/classes/java/main" path="src/main/java"/> |
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.
Should we remove the checker-qual
files .project
and .classpath
?
They duplicate files that are in checker
, e.g. when I look up NullnessType
I see two matches.
The "real" location is in checker
, so do we need to integrate this directory at all?
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.
So I tried doing this and then run into cyclic dependency problems.
So as alternative, can we use checker-qual
as binary dependency but use the source code from checker
?
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.
I've changed it to depend on checker-qual.jar and removed the .project and .classpath from checker-qual project.
checker/.classpath
Outdated
<classpathentry kind="src" path="/javacutil"/> | ||
<classpathentry kind="src" path="/checker-qual"/> | ||
<classpathentry kind="src" path="/jsr308-langtools"/> |
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.
One more thing: at the moment every project depends on the other projects. It would be nicer if e.g. checker
didn't need to depend on jsr308-langtools
and dataflow
directly, because it got that dependency from framework
.
In the IDE, in the "Java Build Path" under "Order and Export" you can export the packages and thereby make these dependencies more implicit.
This PR updates the Configure Eclipse to edit the Checker Framework chapter of the manual, and updates the set of eclipse
.project
and.classpath
files.The eclipse project files are modified to be plain Java projects, and outputs compiled class files to the
build/classes/java
directory. This change makes the compiled output directory consistent with Gradle, and allows the updated bin-devel/javac script to work with eclipse generated outputs, as the script only examines class files inbuild/classes/java
.