Skip to main content
AgeCommit message (Collapse)AuthorFilesLines
2019-06-25Bug 548491 - [regression][mac] Cheese in java editorTill Brychcy4-1/+10
Change-Id: I32415326801837c10bc4fb6d7e18d832c20b3645
2019-06-21Bug 443089: Save Dialog doesn't handle files with multipart extensionsLakshmi Shanmugam4-0/+18
Reverted code changes made for Bug 347430. Don't use setAllowedFileType to set the filter extensions to the NSSavePanel as it doesn't support multi-part extensions such as tar.gz. Used delegate method panel:userEnteredFilename:confirmed: to handle the overwrite case when name field has filename without extension. Cocoa APIs in general don't support multi-part extensions. However, SWT FileDialog needs to support them. Hence, add the required extensions manually on save and selection change. Change-Id: I221f75476f1c1d263f64da239845c325b436bfca
2019-06-18Bug 548378: [Mac]Replace deprecated method used FileDialogLakshmi Shanmugam4-9/+36
Replace panel:shouldShowFilename: which has been deprecated in Mac 10.6. with NSOpenSavePanelDelegate.panel:shouldEnableURL: Change-Id: If2eba8a2b1bba959cda18a7ac56be5405d1ddfca
2019-06-14Bug 547304 - [cleanup] Fix wrong space/tab indentationPaul Pazderski1-3/+3
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: Ib7b260691acee06845cc580dd8cb859de0da8bf1
2019-06-14Bug 547192 - [Cocoa] Replace deprecated Carbon functions (Part 1)Nikita Nemkin13-7/+222
Deprecated function | Modern equivalent ------------------------------------------------------------------- Gestalt | NSProcessInfo.operatingSystemVersion GetDblTime | NSEvent.doubleClickInterval GetCurrentEventButtonState | NSEvent.pressedMouseButtons ATSFontActivateFromFileReference | CTFontManagerRegisterFontsForURL Change-Id: I7ba3e3da6c73117bc7800d022b8eba9fb3cc907a Signed-off-by: Nikita Nemkin <>
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 Nemkin183-8357/+5548
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 Nemkin18-633/+95
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-24/+12
Revert "Bug 515610 - [GTK] SWT generates incorrect fall-through for memmove()" This reverts commit 4c3b9d2b9864a1910c5116168456ab215a2dc2aa. Change-Id: Iea193f29a877face605deaa51bfce96027f7d7ac Signed-off-by: Nikita Nemkin <>
2019-04-24Bug 546144 - [JNI] Revert some recent jnigen changesNikita Nemkin2-347/+347
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 Wolf2-347/+347
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-09-12Bug 538526: Configure SWT build scripts for 4.10Lakshmi Shanmugam1-1/+1
Added revision info to SWT version to avoid incrementing minor version with every native build and delay incrementing major version. The revision will be incremented when there is a native change/build The minor version will be incremented by 1 for maintenance stream fixes The minor version will be incremented by 2 for every quarterly release Updated the make files to include the revision info in the native library names as {maj_ver}{min_ver}r{rev} On windows, the rc files and dlls will use {maj_ver},{min_ver},{rev},0 for file version. Change-Id: I8ea6ef8f72837800ad40d4fbf44745b99c349ecd
2018-08-21Bug 530393 - EPL 2.0 update for SWT bundlesLars Vogel224-672/+1344
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 Shanmugam2-2/+2
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 Shanmugam17-46/+64
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 Shanmugam4-3/+27
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 Shanmugam4-27/+3
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 Shanmugam5-1/+39
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 Shanmugam4-21/+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 Shanmugam4-20/+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 Shanmugam4-25/+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 Brychcy9-1/+70
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 Shanmugam4-0/+24
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 Shanmugam7-0/+76
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-06-22Bug 516805: Change MACOSX_DEPLOYMENT_TARGET from 10.7 to 10.10Lakshmi Shanmugam1-1/+1
Change-Id: Ifbf8182b81fe23a8881e1e3380c7e13d71296f96
2017-06-20Bug 506092 - Drop support for Mozilla XULRunnerGunnar Wagenknecht2-32/+1
Stop building the xulrunner library on mac. Remove the xulrunner related targets & code from build files. Change-Id: I8a12b1291d86385ff8ddc39a83b432866a64183c Signed-off-by: Gunnar Wagenknecht <>
2017-05-02Bug 515610 - [GTK] SWT generates incorrect fall-through for memmove()Martin Oberhuber1-12/+24
An incorrect fall-through in generated C code for memmove() led to producing code which could memmove() to NULL pointer destination or from a NULL pointer source. Even in case this was just dead code and could never execute, it led to an unnecessary inefficiency in the default case (an extra jmp instruction to jump over the dead code). This is resolved by a better generator, which generates an earlier jump to fail: thus avoiding the undesired fall-through. Patchset 4: (Leo) - Win32's doesn't have memmove, only MoveMemory, so Win32 not affected. - Adding Cocoa's resulting os.c of this patch. (I launched a child eclipse with this patch to have newest SWT tools, then set .classpath_cocoa -> .classpath and modified for cocoa) Change-Id: I9f9153ae3f41f4aea3a9f9439e92a892224b1475 Signed-off-by: Martin Oberhuber <> Signed-off-by: Leo Ufimtsev <>
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 Brychcy6-25/+56
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 Thondapu70-608/+593
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 Shanmugam7-70/+70
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-09-08Bug 500363: Native auto generated files should mention that they areLeo Ufimtsev5-5/+20
auto generated When doing work with native files, it's not clear as to which files are auto generated and which files are written manually. Especially when you are just starting to work with native C code. I added a method to that inserts a note to every generated file about the file being auto-generated. [Update Patchset 3] - The updated patchset updates contains auto-generated files for all platforms. - Fixed typo and added name of generator class. Change-Id: I7fdac972eb2cb829316d0e970601ed4c87e6008b Task-Url: Signed-off-by: Leo Ufimtsev <>

Back to the top