Skip to content
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

Link to java sources into native fragments to compile them in fragments #1008

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
<classpathentry kind="src" path="Eclipse SWT/emulated/expand"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/tooltip"/>
<classpathentry kind="src" path="Eclipse SWT PI/common"/>
<classpathentry kind="src" path="Eclipse SWT PI/cocoa">
<attributes>
<attribute value="org.eclipse.swt.cocoa.macosx.x86_64" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="Eclipse SWT PI/cocoa"/>
<classpathentry kind="src" path="Eclipse SWT Accessibility/common"/>
<classpathentry kind="src" path="Eclipse SWT Accessibility/cocoa"/>
<classpathentry kind="src" path="Eclipse SWT AWT/common"/>
Expand All @@ -29,6 +25,5 @@
<classpathentry kind="src" path="Eclipse SWT WebKit/cocoa"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/cocoa"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/common"/>
<classpathentry kind="src" output="bin_build" path="build-scripts"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
<classpathentry kind="src" path="Eclipse SWT/cairo"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
<classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
<classpathentry kind="src" path="Eclipse SWT/common"/>
<classpathentry kind="src" path="Eclipse SWT PI/gtk">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="org.eclipse.swt.gtk.linux.x86_64"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="Eclipse SWT PI/gtk"/>
<classpathentry kind="src" path="Eclipse SWT PI/cairo"/>
<classpathentry kind="src" path="Eclipse SWT PI/common"/>
<classpathentry kind="src" path="Eclipse SWT Accessibility/gtk"/>
Expand All @@ -31,6 +27,5 @@
<classpathentry kind="src" path="Eclipse SWT OpenGL/glx"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/common"/>
<classpathentry kind="src" path="Eclipse SWT WebKit/gtk"/>
<classpathentry kind="src" output="bin_build" path="build-scripts"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
<classpathentry kind="src" path="Eclipse SWT/win32"/>
<classpathentry kind="src" path="Eclipse SWT/common"/>
<classpathentry kind="src" path="Eclipse SWT PI/common"/>
<classpathentry kind="src" path="Eclipse SWT PI/win32">
<attributes>
<attribute value="org.eclipse.swt.win32.win32.x86_64" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/>
</attributes>
Comment on lines -8 to -10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HannesWell I just found that because of removing this attribute it is not possible to start a standalone SWT snippet from the IDE anymore. With this attribute, the java.library.path refers to the fragment containing the SWT dlls, which is missing without it. Was there a specific reason why you removed the attribute? Or can we reinsert it or provide some other way to run SWT standalone snippets easily?

Copy link
Contributor

@Phillipus Phillipus Feb 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same on Mac .classpath.

I added the following back to Mac and it worked:

<classpathentry kind="src" path="Eclipse SWT PI/cocoa">
    <attributes>
        <attribute value="org.eclipse.swt.cocoa.macosx.aarch64" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/>
    </attributes>
</classpathentry>

Copy link
Contributor

@Phillipus Phillipus Feb 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HannesWell @HeikoKlare If the attribute is re-instated then on Mac there needs to be two .classpath_cocoa files - one for aarch64 and one for x86_64. (And for Linux as well?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the change would need to be done in every fragment's classpath file.

Copy link
Member Author

@HannesWell HannesWell Feb 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. When implementing this change I only tested it with an Eclipse application and for an OSGi runtime this was not necessary, so I assumed it was a left-over from old times.
But testing it now with a standalone SWT snippet I also see it fails, sorry for the disturbance.

But at the same time this was a welcome simplification since it allowed to re-use the same .classpath file for all macos platforms. At the .classpath file for Linux/GTK only referenced the x86_64 arch project so it will probably not have worked for development on all platforms.
To make it work we would probably have provide individual .classpath files for each fragment.
I have opened #1031 to investigate if we can use a variable for that, but it currently seems not to work :/

</classpathentry>
<classpathentry kind="src" path="Eclipse SWT PI/win32"/>
<classpathentry kind="src" path="Eclipse SWT OLE Win32/win32"/>
<classpathentry kind="src" path="Eclipse SWT Accessibility/win32"/>
<classpathentry kind="src" path="Eclipse SWT Accessibility/common"/>
Expand All @@ -25,6 +21,5 @@
<classpathentry kind="src" path="Eclipse SWT Browser/win32"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/win32"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/common"/>
<classpathentry kind="src" output="bin_build" path="build-scripts"/>
<classpathentry kind="output" path="bin"/>
</classpath>
132 changes: 132 additions & 0 deletions binaries/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
ILLEGAL_EXTEND=Error
ILLEGAL_IMPLEMENT=Error
ILLEGAL_INSTANTIATE=Error
ILLEGAL_OVERRIDE=Error
ILLEGAL_REFERENCE=Error
ILLEGAL_EXTEND=Ignore
ILLEGAL_IMPLEMENT=Ignore
ILLEGAL_INSTANTIATE=Ignore
ILLEGAL_OVERRIDE=Ignore
ILLEGAL_REFERENCE=Ignore
INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error
INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
Expand Down
84 changes: 84 additions & 0 deletions binaries/org.eclipse.swt.cocoa.macosx.aarch64/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
Expand All @@ -22,7 +27,86 @@
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
<linkedResources>
<link>
<name>.classpath</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/.classpath_cocoa</locationURI>
</link>
<link>
<name>.settings</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/.settings</locationURI>
</link>
<link>
<name>Eclipse SWT</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT</locationURI>
</link>
<link>
<name>Eclipse SWT Accessibility</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20Accessibility</locationURI>
</link>
<link>
<name>Eclipse SWT AWT</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20AWT</locationURI>
</link>
<link>
<name>Eclipse SWT Browser</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20Browser</locationURI>
</link>
<link>
<name>Eclipse SWT Custom Widgets</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20Custom%20Widgets</locationURI>
</link>
<link>
<name>Eclipse SWT Drag and Drop</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20Drag%20and%20Drop</locationURI>
</link>
<link>
<name>Eclipse SWT OLE Win32</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20OLE%20Win32</locationURI>
</link>
<link>
<name>Eclipse SWT OpenGL</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20OpenGL</locationURI>
</link>
<link>
<name>Eclipse SWT PI</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20PI</locationURI>
</link>
<link>
<name>Eclipse SWT Printing</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20Printing</locationURI>
</link>
<link>
<name>Eclipse SWT Program</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20Program</locationURI>
</link>
<link>
<name>Eclipse SWT WebKit</name>
<type>2</type>
<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT%20WebKit</locationURI>
</link>
</linkedResources>
<variableList>
<variable>
<name>SWT_HOST_PLUGIN</name>
<value>$%7BPARENT-2-PROJECT_LOC%7D/bundles/org.eclipse.swt</value>
</variable>
</variableList>
</projectDescription>
Loading
Loading