Skip to main content
AgeCommit message (Collapse)AuthorFilesLines
2019-05-17Bug 547191 - [Cocoa] Remove support code for macOS 10.9 and earlierNikita Nemkin1-18/+9
* Remove code blocks guarded by OS.VERSION/OS.VERSION_MMB < 10.10. * Retire OS.VERSION and rename OS.VERSION_MMB to OS.VERSION. This also fixes gestaltSystemVersion warning on startup. Change-Id: I02614dc5c72c70ae0d0d7c57f23ec2cafd3d0cce Signed-off-by: Nikita Nemkin <>
2019-05-10Bug 546768 - [Cocoa] Remove 32-bit codeNikita Nemkin179-3384/+3382
Part 2 of 32-bit removal patch set. * Run the automated 32-bit annotation removal script. (Attached to the bug report). * Run MacGenerator to strip some redundant casts. Change-Id: I6534ea449e8f60b87f0da935bccf955b93a49279 Signed-off-by: Nikita Nemkin <>
2019-05-10Bug 546694 - [Cocoa] Re-enable struct generation in MacGeneratorNikita Nemkin13-111/+63
Struct generation was disabled in 6ddf285abe, likely to allow for customization (for example, flattening of NSRect). Partially re-enable struct generation with the help of two new bridgesupport tags (on <struct>): swt_gen_memmove - generate OS.memmove and OS.***_sizeof for the struct. This is independent from swt_gen and allows custom struct definition without losing automatically generated helper functions. swt_gen_tostring - generate simple toString() implementation. This matches previously handwritten toString() code. With this patch, all Cocoa structures except NSRect become auto-genrated. Since memmove generation is now configurable, I've removed unused memmoves. Change-Id: Ia2cd3fcb3bc7cece5668d6c7c32ca1f6d22128ef Signed-off-by: Nikita Nemkin <>
2019-04-26Bug 540357 - [10.14] Make SWT adapt to switching to dark mode (and back)Lakshmi Priya Shanmugam4-0/+26
The patch sets the appearance of SWT application to dark or light based on the system setting. The patch reads the setting only at startup, changing the system setting dynamically doesn't cause any change in SWT. Change-Id: I0d49f2995f55dae2a6349504a2a63e1c3723319f
2019-04-24Bug 546144 - [JNI] Revert some recent jnigen changesNikita Nemkin1-141/+141
Revert "Bug 534923 - Cocoa: objc_msgSend is called incorrectly from os.c" This reverts commit 94bbab9593afe86192ce9ff1c7d23f9003c3ef5e. Change-Id: If227caf179ffc8cb018c343d3b99d3535aea8d04 Signed-off-by: Nikita Nemkin <>
2019-04-19Bug 546585 - [Cocoa] Don't use objc_msgSend to call variadic functionsNikita Nemkin6-88/+2
JNIGen generates wrong C code for calling variadic ObjC methods, remove all such methods from SWT codebase. Change-Id: Icee75b71c4035a331a4b52ddcaf65e0d59c8793c Signed-off-by: Nikita Nemkin <>
2019-02-05Bug 534923 - Cocoa: objc_msgSend is called incorrectly from os.cThomas Wolf1-141/+141
C calling conventions may be different for vararg and non-vararg functions. Change the generated code to not cast vararg functions to function pointers with non-vararg profiles. Instead annotate the objc_msgSend* functions in MacGenerator as "fixedargs=2" (meaning: it's a vararg function with two fixed parameters), and change the NativesGenerator to use this annotation to generate a cast to a function pointer with a vararg profile with that many fixed parameters. "fixedargs=0" or absence of the "fixedargs" annotation means all parameters are fixed; there are no varargs. The behavior in this case in unchanged. The casting cannot be avoided altogether; the objc_msgSend*_stret functions _must_ be casted. Also use BOOL as return type for the cast of objc_msgSendSuper_bool, not just for objc_msgSend_bool. Verified that casting to a profile with varargs indeed makes the compiler generate the assembly code that on x86_64 does clear register %al, as it should per the ABI spec.[1] The old code generated did not do this. (Verified with with cc -S using Apple's clang and inspecting the assembler output; on OS X 10.14.2.) Ran the new MacGenerator to regenerate the Cocoa, then ran the new JNIGenerator to regenerate the Cocoa os.c. Re-built the binary library. Set up an Eclipse using this rebuilt library and ran all SWT tests. All tests passed locally. [1] Change-Id: Ib03226ad9ecdf4bfcf789cd2b42f592b9a2b9021 Signed-off-by: Thomas Wolf <>
2019-01-29Bug 459789 - [Mac] Window title bar should be dark when Eclipse is inLakshmi Priya Shanmugam4-0/+69
dark theme Use NSWindow.appearance to set the the title bar to dark or light. Added a new setTheme method that will send the appAppearanceChanged custom message and set the appearance of the window to either Dark or Light. It'll be called from Platform UI code whenever there is a theme change.
2018-08-21Bug 530393 - EPL 2.0 update for SWT bundlesLars Vogel212-636/+1272
Update all sources files except .exsd files, Java pref files and pom files Staged via: git grep --name-only 'Eclipse Public License 2.0' > input.txt Manually added \ before the spaces in the directories with spaces cat input.txt | xargs git add Regex used: git checkout master git reset --hard origin/master git pull find . -type f ! -name "*.exsd" ! -name "org.eclipse.jdt.ui.prefs" -exec sed -i 's/Eclipse Public License v1.0/Eclipse Public License 2.0/g' {} + find . -type f ! -name "*.exsd" ! -name "org.eclipse.jdt.ui.prefs" -exec sed -i -E 's/([[:blank:]]*[^[:blank:]])*([[:blank:]]*)http:\/\/\/legal\/epl-v10.html/\1\2https:\/\/\/legal\/epl-2.0\/\ \1\ \1\2SPDX-License-Identifier: EPL-2.0/' {} + # Get rid of the All rights reserved find . -type f ! -name "*.exsd" ! -name "org.eclipse.jdt.ui.prefs" ! -name "pom.xml" -exec sed -i -E 's/([[:blank:]]*[^[:blank:]])*([[:blank:]]*)(All rights reserved. )/\1\n\1\2/' {} + Change-Id: If93c95c1ce4c7ee8345dea43e7b9ae71f5fa4739 Signed-off-by: Lars Vogel <>
2018-08-01Bug 520134: Mac generator removes space incorrectly in OS.javaI20180801-0800Lakshmi Shanmugam1-1/+1
The updated Mac generator removes the struct from struct FSRef. Source code changes with the updated Mac Generator. Change-Id: I75597419ac93dcca8c0db0851e2e7c02361bb690
2018-07-28Bug 514191 - Bridge support files should be updated to latest macOSLakshmi Shanmugam14-43/+47
supported version (10.11) Updated Cocoa classes and extras file after changes to bridgesupport files. Change-Id: I3e60736d1452ac9e062650193a6a3f258e353f55 Signed-off-by: Lakshmi Shanmugam <>
2018-07-28Bug 514191 - Bridge support files should be updated to latest macOSLakshmi Shanmugam5-15671/+18927
supported version (10.11) Change-Id: I6acae0343ae5abbd59ef18838d21c1d23fc99ab3 Signed-off-by: Lakshmi Shanmugam <>
2018-07-17Bug 534977: [StyledText] Bad renderer with setStyleRange & gc draw in a ↵I20180717-2000Lakshmi Shanmugam1-0/+2
paint event This reverts commit bb1ea18b584ec1a364834b3fa0ae316c1f8453a1 for "Bug 366471: [Cocoa] Slow scrolling in editor on Mac OS X" This reverts the removal of the call to runPaint() in display.readAndDispatch(), the setNeedsDisplay and setNeedsDisplayInRect Change-Id: I95d4c967eb84f68cad0270b3254434bbc11418ce
2018-03-19Bug 532139 – Add Copyright to a java few files.Leo Ufimtsev1-0/+10
Adding missing copyright notices and removing old Command line interface that is no longer being used as such testing can be accomplished via launch groups. Bug: Change-Id: I9cc3e9a48e70adbd49c993e39100be1301ea5551 Signed-off-by: Leo Ufimtsev <>
2018-03-13Bug 366471: [Cocoa] Slow scrolling in editor on Mac OS XLakshmi Shanmugam1-2/+0
Removes the call to runPaint() in display.readAndDispatch(), the setNeedsDisplay and setNeedsDisplayInRect callbacks and the NSMutableArray instances (Display.isPainting, needsDisplay and needsDisplayInRect). Change-Id: I63d460b6155819c2e90a8ed049b702f0f7bee654
2018-01-30Bug 525305: [API]Provide SWT.OpenUrl eventLakshmi Shanmugam2-2/+6
application:openUrls: is a custom selector, move it out of the auto-generated function. Otherwise, it'll be removed by the MacGenerator. Change-Id: Icbb26c1e0abc9340798dc1c39f2cbf217deceea2
2018-01-17Bug 525305 - [API]Provide SWT.OpenUrl eventChristian Georgi2-0/+2
Introduces new SWT.OpenUrl event type. On Mac, the SWT.OpenUrl event will be generated whenever Equinox calls the application:openUrls: selector. One event will be generated for each URL received from OS X. On Windows we emit the OpenUrl event if a valid URL is passed in, otherwise the OpenDocument event is sent, preserving compatibility. (Linux implementation is not included) Bug: 351303 Change-Id: Ic0cce76ce21fed0f2b182d24a29e51b821264093 Signed-off-by: Mads Mætzke Tandrup <> Signed-off-by: Christian Georgi <> Signed-off-by: Lakshmi Shanmugam <>
2017-11-27Bug 525976 - Replace if/else cascades by switch statementsKarsten Thoms2-1458/+2980
- Added enum Selector that lists all used selectors Mixed hand-crafted & generated code - OS: - Use Selector literal values for selector constants initialization - Added a map for mapping Long selector value to their Selector literal - MacGenerator: - Extended generator to write selector literals to - Changed generation of selector constants in - Regenerated code with MacGenerator - MacGeneratorView: Improved error message when target root folder is not available - JNIGenerator: Ignore CCE for enum types Change-Id: Ic62f9e8a36b7c8dd103a0efb04bfc242f4bf757a Signed-off-by: Karsten Thoms <>
2017-11-14[Bug 525465] TextLayout with embedded images is missing text on macOSLakshmi Shanmugam2-1/+9
High Sierra NSTextAttachmentCellProtocol has a new and required property "attachment" since 10.11. Added attachment method to SWTTextAttachmentCell for macOS version >= 10.11 Change-Id: I9b0686db3c90e6b7b8d5fd4db0a0c2b1c27d19ac
2017-10-16Bug 521849: Fix deprecated warnings in Mac native buildI20171016-2000Lakshmi Shanmugam1-5/+0
NSWindowList was removed by an earlier commit. Remove NSWindowList from the AppKitFull.bridgesupport.extras file
2017-09-29Bug 521849: Fix deprecated warnings in Mac native buildLakshmi Shanmugam1-5/+0
NSWindowList is deprecated since 10.6. Remove it as it is no longer used in the code. Change-Id: I8c095df071d22aeb473a1ea3b7db1f0f03898a11
2017-09-29Bug 521849: Fix deprecated warnings in Mac native buildLakshmi Shanmugam1-2/+0
SetFrontProcess is deprecated since 10.9. Remove it as the minimum supported mac OS version is 10.10 and is no longer required in Display class. Change-Id: I29862661233f12af5a1340a24b6b27e9ed87ea82
2017-09-29Bug 521849: Fix deprecated warnings in Mac native buildLakshmi Shanmugam1-7/+0
'NSAddImage' is deprecated in macOS 10.5. It was required for xulrunner10 support. Remove it now as there is no XULRunner code/support. Change-Id: Ic8f2eb7d7ba66cda16072452beda43ced11655f8
2017-09-25Bug 522349 - Use system cursor for SWT.CURSOR_WAITKarsten Thoms1-0/+4
Use non-API 'busyButClickableCursor' selector to get an animated waiting cursor for SWT.CURSOR_WAIT. Fallback to old code if selector is not available. Change-Id: Idf991748da1d87cc39ec5a137b4dbf436d23966b Signed-off-by: Karsten Thoms <>
2017-09-07Bug 505835 - [Cocoa] Button, do not respect foreground and backgroundTill Brychcy6-1/+48
color on MAC Perform custom coloring for Button background. Change-Id: I34084136e206e08e8a97fe8198720a093abdd589 Signed-off-by: Till Brychcy <>
2017-08-21Bug 519089:[Java 9] Automatic window tabbing should be disallowedLakshmi Shanmugam2-1/+4
In macOS 10.12, a new system preference "prefer tabs when opening documents" has been added which causes automatic tabbing of windows in Eclipse. This is by default enabled to work when application is in fullscreen mode and can be modified to work always. Disable automatic window tabbing, but setting the NSWindow.allowsAutomaticWindowTabbing property to false. Change-Id: I7f22249d92dabe2597147b9089c42f79b68ac6c4
2017-08-18Bug 508129 - [10.11]PaintEvent.GC.copyArea () crashes Eclipse Neon onLakshmi Shanmugam1-0/+2
OSX 10.11 and above When a GC is created with a control as the Drawable and GC.copyArea() is called, a SWT.Paint event is sent unexpectedly. This happens because NSView.cacheDisplayInRect() calls drawRect() which causes a SWT.Paint event to be sent. The fix is to ignore this paint event and prevent SWT from sending it to the clients. This is handled by creating a custom callback for cacheDisplayInRect, setting the ignorePaint flag and then calling the Cocoa implementation of cacheDisplayInRect. The ignorePaint flag is reset after the call. Change-Id: I4c2e2986b83868082295ea187b543376bf4c8a7e
2017-08-11Bug 467205 - [10.10] FileDialog/DirectoryDialog with SWT.SHEET misplacedI20170811-2000Lakshmi Shanmugam4-0/+42
after slide-down animation Replaced deprecated NSSavePanel and NSOpenPanel APIs with newer ones. The new API NSSavePanel.beginSheetModalForWindow that is required to show the Sheet, uses objective-c block for completion handler. This call can't be made directly from Java, as Java doesn't support the block syntax (^). Hence, it is called from a wrapper function inside C code in os_custom.c. The wrapper function calls beginSheetModalForWindow with the objective C block syntax. The completion handler block is also implemented in os_custom.c which callsback to the Java functionFileDialog/DirectoryDialog._completionHandler(). Change-Id: Ib03881a68ef7ecaf2132cf91a4137aef8b6fe3fc
2017-07-25Revert unintended change from earlier commit for Bug 455854Lakshmi Shanmugam1-1/+1
Change-Id: I7511746653934469cfd1a2506057d913fd99ff85
2017-07-24Bug 455854: Text field with SWT.SEARCH style ignores setBackgroundStefan Winkler6-2/+53
Implemented custom SWTSearchFieldCell to handle non-default background color. Change-Id: I80db1fa0c42ca3ad194e8416ef1793aa6328f992 Signed-off-by: Stefan Winkler <>
2017-07-05Bug 419757: HTML5 database doesn't work for embedded webkit browserLakshmi Shanmugam1-1/+3
under Mac OSX Implement WebUIDelegate method - webView:frame:exceededDatabaseQuotaForSecurityOrigin:database: and increase the quota as desired when that method is called Change-Id: Icf8fa3682134ae2d4796ba1f07d0dcdf5ac42b35 Signed-off-by: Lakshmi Shanmugam <>
2017-04-11Bug 514424 - [Cocoa] Allow styling of table and tree headers backgroundTill Brychcy1-5/+0
in SWT Change-Id: I52b9c22fbc03da0f16738ab215936ce18ee313f5 Signed-off-by: Till Brychcy <> Signed-off-by: Lakshmi Shanmugam <>
2017-03-24Bug 502711 - [Cocoa][10.12]crashes on „macOS Sierra“ related toArun Thondapu1-6/+0
NSCopyBits Disable generation of code for deprecated method NSCopyBits as it is not used anymore Change-Id: I2163508166467a8c1a42cbdb5a0e15aaab5249ba Signed-off-by: Arun Thondapu <>
2017-03-23Bug 502711 - [Cocoa] crashes on „macOS Sierra“ related to NSCopyBitsTill Brychcy3-6/+16
Replaced the calls to deprecated method NSCopyBits with NSView.scrollRect() in GC.copyArea and Canvas.scroll. Removed the native code for NSCopyBits. Change-Id: I206c76cd6af9230857967fb23641f0773f90e5de Signed-off-by: Till Brychcy <> Signed-off-by: Lakshmi Shanmugam <>
2017-03-23Bug 502090 - [Cocoa] Bridge support files should be updated to latestArun Thondapu67-597/+568
macOS supported version Source changes generated by the MacGenerator using the updated bridge support files from macOS 10.10 Change-Id: Id9b0cffb795bfb0b5ca304efc00ef5d8f23b86af
2017-02-07Bug 502090 - macOS 10.10 (Yosemite) bridge support filesMikael Barbero6-23036/+34067
Change-Id: Ia6acbc6ea9a8b98b9664057cd48c97de9d2af70d Signed-off-by: Mikael Barbero <>
2017-01-30Bug 302448 - Use new clipboard constantsLakshmi Shanmugam4-25/+25
Replaced old deprecated clipboard constants with new ones. Replaced writeToPasteboard with writeObjects.
2017-01-23Bug 481144 - [Cocoa] Text lowered badly on Widgets in Preference andLakshmi Shanmugam2-4/+0
Properties - Mac 10.10+ (AKA "Lowered Textpectations") Fixed the test failure when bad font name is used. Removed unused constants.
2017-01-20Bug 481144 - [Cocoa] Text lowered badly on Widgets in Preference andPhillip Webb3-1/+15
Properties Update Font init method to directly use the system font when possible. Prior to this commit OSX 10.11 and higher (systems that use the San Francisco font) can render with unusual spacing. The root cause seems to be that the system font has an unusual baseline when a system font is manipulated or obtained by name. Specifically: - Calling `NSFont.systemFontOfSize` will return a font that renders correctly. - Calling `NSFont.boldSystemFontOfSize` will return a font that renders correctly. - Calling `NSFont.systemFontOfSize` followed by `NSFontManager .convertFont` will return a font that renders too low. - Calling `NSFont.fontWithName(".SF NS Text")` will return a font that sometimes renders too low (things seem to consistently go wrong when it's called after a `convertFont` call). The `Font.init` now attempts to deduce if the font requested is actually a system font and use direct system font handles. This update also seems to fix issue 486734. Change-Id:Ic613f72b911822385dfb9f0b32f82d8a5d895c77 Signed-off-by: Signed-off-by: Lakshmi Shanmugam <>
2016-05-06Bug 493114 - DPIUtil.DeviceZoom is not set on MacLakshmi Shanmugam1-1/+2
Set DPIUtil.deviceZoom. Image.getImageDataAtCurrentZoom() will scale the image data using DPIUtil.autoScaleImageData() if old image constructors are used.
2016-03-14Bug 480852 - [Cocoa] GC.copyArea() crashes application on OSX 10.11Lakshmi Shanmugam3-1/+21
Use NSView APIs instead of Quartz APIs to copy area from a view onto an image
2016-01-07Bug 485367 - cleaned trailing spaces in swt (cocoa)Andrey Loskutov15-51/+51
Change-Id: I47e7c08d8fdd9beea2ace6603c5de79755925f48 Signed-off-by: Andrey Loskutov <>
2015-11-04Bug 477979 - [10.11] SWT can't receive input on non-standard JVMs Lakshmi Shanmugam2-0/+2
Use OS.NSAnyEventMask insteadof 0 in NSApplication.nextEventMatchingMask() in Display and Tracker class. Change-Id: Ia4f24f3e013a2fcf15e601c3297d2668505893bc Signed-off-by: Lakshmi Shanmugam <>
2015-11-02Bug 462633: Enable save actions for annotationsMarkus Keller8-0/+10
Added missing @Override/@Deprecated in cocoa
2015-10-23fix mac generator problemsLakshmi Shanmugam2-4/+3
fixed problems caused by changes for Bug 447972 and Bug 461486
2015-10-20Revert "Bug 302448 - Use new clipboard constants"Lakshmi Shanmugam4-24/+24
This reverts commit 6e99d1730da179bba71d9097aa327fa9e16bea93. native build failed as the 10.6 clipboar symbols didn't compile on the build machine (which is OSX 10.5)
2015-10-19Bug 302448 - Use new clipboard constantsLakshmi Shanmugam4-24/+24
Replaced old clipboard constants with new ones. Replaced writeToPasteboard with writeObjects.
2015-09-22Bug 461486 - Disable the move of a shellEugen Neufeld2-1/+9
Added NO_MOVE flag to the SWT class, that can disable the move of a Shell. Usage example: Shell shell = new Shell(parent, SWT.SHELL_TRIM|SWT.NO_MOVE); Contribution contains implementations for gtk, Win32 and Cocoa. Change-Id: Ia5cc50009b81cf08e631a695673f6a31779b6222 Signed-off-by: Alexandra Buzila <> Signed-off-by: Eugen Neufeld <>
2015-09-21Bug 459402 - [Cocoa] (Mac dual monitor on OS X 10.10) Widgets inLakshmi Shanmugam3-1/+11
preference dialog become dark and unreadable if a TrayItem instance is created Prevent text foreground and background colors from changing when in dark mode, trayItem is present and System settings for color or display changes.
2015-07-31Bug 386252 - Deprecation warning running SWT on Mountain LionLakshmi Shanmugam4-15/+0
Remove occurrences of NSScreen.userSpaceScaleFactor

Back to the top