RFR: 8221708 Update Eclipse project files
Andy Goryachev
angorya at openjdk.org
Sun Nov 6 00:24:29 UTC 2022
On Sat, 22 Oct 2022 07:49:12 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
> See https://bugs.openjdk.org/browse/JDK-8221708
tens of thousand of errors in eclipse.
looks like some projects are misconfigured.
Changes requested by angorya (Author).
removed the project, imported back as a gradle project, reverted the gradle changes (the usual process).
now it shows 44,980 errors in controls, fxml, systemTests, web projects.
Nir:
apps is a project (there is a .project file in apps).
the second import (a clean import of John's branch) shows apps with no errors.
<img width="431" alt="Screen Shot 2022-10-25 at 17 02 36" src="https://user-images.githubusercontent.com/107069028/197903998-8bfb1d81-d84f-44c0-8a72-07d831dfaa13.png">
looks like Eclipse gets confused by something. I closed 'controls' project, reopened it and Eclipse showed additional files modified by gradle. Reverted those, and now all builds except for systemTests. 20,186 errors in systemTests project.
The open/close trick does not work with systemTests.
One difference I see is that the official process to import the project, according to https://wiki.openjdk.org/display/OpenJFX/Using+an+IDE#UsinganIDE-ConfigureEclipsetousethelatestJDK , is to use `Import as Gradle Project` rather than import as existing project.
It's even worse: import as a gradle project, let gradle create a bunch of .project and .classpath files, refresh, the *revert* everything gradle did, refresh. That results in a gradle project in eclipse, with gradle tasks and everything ( I am still using command line gradle to build).
If I do this with your latest build, I see:
- 20K errors in systemTests project due to misconfigured source paths
- none of the projects inside systemTests
My first instinct is try removing systemTests .project file so all the nested projects in there become visible.
Another issue is that I don't see projects in tests/manual as eclipse projects, so something isn't right (probably because of the nested projects or the way gradle works with eclipse?)
Thank you for suggesting closing and reopening projects - it does something beyond F5 refresh and gets eclipse in sync.
I think there is a problem with the projects still:
- import an existing project (with Search for nested projects option enabled) first causes "Creation Problems" (see attached), and then produces 3 errors and 30 warnings.
Description Resource
Missing Gradle project configuration file: .settings/org.eclipse.buildship.core.prefs 3DViewer
Missing Gradle project configuration file: .settings/org.eclipse.buildship.core.prefs Ensemble8
Missing Gradle project configuration file: .settings/org.eclipse.buildship.core.prefs Modena
- import as gradle project, following the standard recipe from https://wiki.openjdk.org/display/OpenJFX/Building+OpenJFX produces 45K errors. A modified procedure described below produces 20K errors.
Modified procedure:
- import as gradle project
- let gradle plugin work, that produces some changes visible in Git Staging view
- refresh
- revert all changes, see 45K errors
- close all projects from Package Explorer, reopen
- for some reason, after reopening Git Staging shows some more changes left. revert those
- see 20K errors
- Project -> clean all does not help, 20K errors
I do not understand why you guys don't see this.
are you importing as a gradle project?
<img width="832" alt="Screen Shot 2022-10-28 at 12 53 27" src="https://user-images.githubusercontent.com/107069028/198721251-a2eff77f-d795-41ff-8ceb-14f18e1012eb.png">
yes, something is wrong with test projects.
Nir's screenshot shows a project-like Properties UI, mine shows a different UI:
<img width="651" alt="Screen Shot 2022-10-28 at 13 34 58" src="https://user-images.githubusercontent.com/107069028/198727492-2961ad7b-b0a0-4725-b952-afdd794bb6fb.png">
(also, Nir, you have some .classpath modified in your screenshot)
Something gets messed up between gradle and eclipse project hierarchy. What could it be?
Nir:
I think I see errors appear in step 2, so something is definitely wrong.
Looks like steps 3 and 4 are new steps. is it possible not to add these extra steps, or have eclipse files configured such that the extra steps are not necessary, as the case is with the current master branch?
I've tried to follow what John proposed (with one exception - I did not clone the repo, used an existing repository). Run a command line gradle build, imported all projects as existing projects (General -> Existing Projects...).
Got 3 errors and 30 warnings (first 3 entries are errors):
Description Resource Type
Missing Gradle project configuration file: .settings/org.eclipse.buildship.core.prefs 3DViewer Gradle Project Configuration Marker
Missing Gradle project configuration file: .settings/org.eclipse.buildship.core.prefs Ensemble8 Gradle Project Configuration Marker
Missing Gradle project configuration file: .settings/org.eclipse.buildship.core.prefs Modena Gradle Project Configuration Marker
Project '3DLighting' has no explicit encoding set 3DLighting No explicit project encoding
Project 'DragDrop' has no explicit encoding set DragDrop No explicit project encoding
Project 'FX8-3DFeatures' has no explicit encoding set FX8-3DFeatures No explicit project encoding
Project 'Hello' has no explicit encoding set Hello No explicit project encoding
Project 'LayoutDemo' has no explicit encoding set LayoutDemo No explicit project encoding
Project 'MandelbrotSet' has no explicit encoding set MandelbrotSet No explicit project encoding
Project 'manualTests-controls' has no explicit encoding set manualTests-controls No explicit project encoding
Project 'manualTests-desktop' has no explicit encoding set manualTests-desktop No explicit project encoding
Project 'manualTests-dnd' has no explicit encoding set manualTests-dnd No explicit project encoding
Project 'manualTests-events' has no explicit encoding set manualTests-events No explicit project encoding
Project 'manualTests-graphics' has no explicit encoding set manualTests-graphics No explicit project encoding
Project 'manualTests-media' has no explicit encoding set manualTests-media No explicit project encoding
Project 'manualTests-printing' has no explicit encoding set manualTests-printing No explicit project encoding
Project 'manualTests-swing' has no explicit encoding set manualTests-swing No explicit project encoding
Project 'manualTests-swt' has no explicit encoding set manualTests-swt No explicit project encoding
Project 'manualTests-text' has no explicit encoding set manualTests-text No explicit project encoding
Project 'manualTests-UI' has no explicit encoding set manualTests-UI No explicit project encoding
Project 'manualTests-web' has no explicit encoding set manualTests-web No explicit project encoding
Project 'PickTest3D' has no explicit encoding set PickTest3D No explicit project encoding
Project 'Robot' has no explicit encoding set Robot No explicit project encoding
Project 'systemTests-test' has no explicit encoding set systemTests-test No explicit project encoding
Project 'systemTests-testapp1' has no explicit encoding set systemTests-testapp1 No explicit project encoding
Project 'systemTests-testapp2' has no explicit encoding set systemTests-testapp2 No explicit project encoding
Project 'systemTests-testapp3' has no explicit encoding set systemTests-testapp3 No explicit project encoding
Project 'systemTests-testapp4' has no explicit encoding set systemTests-testapp4 No explicit project encoding
Project 'systemTests-testapp5' has no explicit encoding set systemTests-testapp5 No explicit project encoding
Project 'systemTests-testapp6' has no explicit encoding set systemTests-testapp6 No explicit project encoding
Project 'systemTests-testapp7' has no explicit encoding set systemTests-testapp7 No explicit project encoding
Project 'systemTests-testscriptapp1' has no explicit encoding set systemTests-testscriptapp1 No explicit project encoding
Project 'systemTests-testscriptapp2' has no explicit encoding set systemTests-testscriptapp2 No explicit project encoding
I wonder if bin/ is created by the eclipse. What happens when you do Project -> Clean?
John, I generally support the idea of importing eclipse projects rather than importing as gradle and then reverting the changes. A straightforward import seems better, it imports all nested projects, and we all seem to use gradle on command line anyway.
And the last thing - I would recommend against checking in launch configurations as it might contain user- or platform- specific constructs. Your suggestion to override dependencies with
-Djava.library.path="../../../modules/javafx.graphics/build/module-lib" --add-modules=javafx.controls
does work.
(and yes, we should check in missing `org.eclipse.core.resources.prefs`, but I don't know what to do with "missing Gradle project configuration file")
After everything works, we'll need to update the wiki
https://wiki.openjdk.org/display/OpenJFX/Using+an+IDE#UsinganIDE-ConfigureEclipsetousethelatestJDK
(perhaps as a separate effort, and perhaps also extract Eclipse sections into a separate page)
.project line 3:
> 1: <?xml version="1.0" encoding="UTF-8"?>
> 2: <projectDescription>
> 3: <name>jfx</name>
this may cause issues with internal setup at oracle
-------------
Changes requested by angorya (Author).
PR: https://git.openjdk.org/jfx/pull/930
More information about the openjfx-dev
mailing list