Closed ptziegler closed 2 months ago
Looks like you have an invalid state of a .classpath
file in the snippets project. The snippet is Windows only and accordingly excluded from the classpath files for MacOS and Linux:
https://github.com/eclipse-platform/eclipse.platform.swt/blob/ca113ca06e4e50bf46056fa46ef45f77998293ac/examples/org.eclipse.swt.snippets/.classpath_cocoa#L5
You should remove the existing .classpath
file in the snippet project and either copy and rename the correct or, if you have an Oomphed setup, perform setup tasks and have Oomph fix that for your.
Hm... the classpath is correctly pointing to .classpath_gtk
:
And there the snippet is correctly excluded:
So it seems like the classpath is simply not updated properly :/ I've checked out a fresh workspace where the error doesn't show up anymore.
Thanks you both for your input!
You are showing the linked .classpath
file of the SWT fragment (like org.eclipse.swt.gtk.linux.x86_64
) , not of the snippets project (i.e., org.eclipse.swt.snippets
). In the snippets project, there is no linking of the correct .classpath
file. It is simply copied by the Oomph setup (or by hand, in a manual setup). This is how it looks like:
Describe the bug
This snippet sets the
nativeZoom
field of the GCData object. However, this field only exists on Windows, leading to a compilation error on both Linux and macOS.https://github.com/eclipse-platform/eclipse.platform.swt/blob/ca113ca06e4e50bf46056fa46ef45f77998293ac/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet382.java#L105-L113
Screenshots
Environment: