Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Update Cocoa bridge support files

It seems that the bridge support files for the Cocoa port are quite outdated. From https://www.eclipse.org/eclipse/development/plans/eclipse_project_plan_4_7.xml#target_environments, the minimum version of supported macOS is 10.11, but there lack some classes/protocols/... from the bridge support files for this version. 

I tried to copy and override the bridgesupport from my own system:

cp /System/Library/Frameworks/AppKit.framework/Resources/BridgeSupport/AppKit.bridgesupport \
path/to/git/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse\ SWT\ PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport

and it works well (at least, missing classes/protocols/.../ show up correctly in the Mac Gen view), but when I try to generate again, it fails with NPE: 

java.lang.NullPointerException
at org.eclipse.swt.tools.internal.MacGenerator.getCType(MacGenerator.java:1450)
at org.eclipse.swt.tools.internal.MacGenerator.generateCustomCallbacks(MacGenerator.java:1509)
at org.eclipse.swt.tools.internal.MacGenerator.generateMainClass(MacGenerator.java:790)
at org.eclipse.swt.tools.internal.MacGenerator.generate(MacGenerator.java:191)
at org.eclipse.swt.tools.internal.MacGeneratorUI.generate(MacGeneratorUI.java:320)
at org.eclipse.swt.tools.views.MacGeneratorView$GenJob.run(MacGeneratorView.java:40)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

It actually fails logically, as a comparison between the current HEAD and my own bridgesupport file shows that declared_type is not specified in my system files. 

Is there anything I could do to update the bridge support files to 10.11 ones?

Thanks.
Mikael

PS: if you wonder why I want to do that, the goal is to test the NSAppearance settings on NSWindow to have a *native* dark theme on macOS. The approach would then be similar to Alex's one for GTK theming support (except that on macOS, we would have no theming, only bright or dark theme, but all native ;)) Check slides 98 to 103 (or video somewhere around 24:00) from https://developer.apple.com/videos/play/wwdc2016/239/ to see what I mean by native dark theme on the mac.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Back to the top