| Summary: | [Big Sur] Tree text is shortened with Ellipsis | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Phil Beauvoir <p.beauvoir> | ||||||
| Component: | SWT | Assignee: | Sravan Kumar Lakkimsetti <sravankumarl> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ahmed, alexandr.miloslavskiy, gayanper, justin, lshanmug, peter, sravankumarl, ts-swt, twolf, yan | ||||||
| Version: | 4.17 | ||||||||
| Target Milestone: | 4.20 M3 | ||||||||
| Hardware: | Macintosh | ||||||||
| OS: | Mac OS X | ||||||||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=572187 https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180344 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=661387b5e458947746c4a4efab049276a38ff6db |
||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 569361 | ||||||||
| Attachments: |
|
||||||||
Created attachment 284612 [details] Screenshot You can also test this with Snippet 15: https://git.eclipse.org/c/platform/eclipse.platform.swt.git/plain/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet15.java It's strange that some SWT Big Sur issues only manifest when running as a new Eclipse instance, RCP app, or snippet from Eclipse (Debug/Run). But they don't manifest when running Eclipse itself, or running the RCP app or snippet stand-alone (not from Eclipse). The difference is likely caused by the difference in SDK version of java executable, see: otool -l `which java` | grep sdk *** Bug 571020 has been marked as a duplicate of this bug. *** Not sure this is Big Sur related. I just had this in a Eclipse Neon.3 child started from an Eclipse 2020-12 on OS X 10.14.6. Once. Didn't re-occur since then, though. The child was using JDK 1.8.0_191 from Oracle, host Eclipse using Amazon Corretto 11.0.3. (In reply to Thomas Wolf from comment #5) > Not sure this is Big Sur related. I just had this in a Eclipse Neon.3 child > started from an Eclipse 2020-12 on OS X 10.14.6. Once. Didn't re-occur since > then, though. The child was using JDK 1.8.0_191 from Oracle, host Eclipse > using Amazon Corretto 11.0.3. It seems to be related to MacOS SDK version used to build the executable. Doesn't happen with Eclipse, built with 10.10 SDK. Can you pls check the SDK version of the java that was used? otool -l ./java | grep sdk (In reply to Lakshmi P Shanmugam from comment #6) > Can you pls check the SDK version of the java that was used? > otool -l ./java | grep sdk Which one? The JDK 1.8 reports "sdk 10.8", the Amazon Corretto 11.0.3 says "sdk 10.12". With Bug 572187, the launcher SDK level is 10.14. This problem is now also seen in base Eclipse. *** Bug 573297 has been marked as a duplicate of this bug. *** We are setting the lineBreakMode for the cell as NSLineBreakByTruncatingTail causing last three characters on the longest string to be replaced with ellipsis. Because at SWT we deal with integer arithmetic for sizes and OS uses floating point arithmetic, we get rounding errors when we calculate sizes. This causes size discrepancy in cell size and text contained in it. This causes OS to truncate the tail. To fix this we should use NSLineBreakByClipping. New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180344 Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180344 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=661387b5e458947746c4a4efab049276a38ff6db Merged to master (In reply to Sravan Kumar Lakkimsetti from comment #10) > We are setting the lineBreakMode for the cell as NSLineBreakByTruncatingTail > causing last three characters on the longest string to be replaced with > ellipsis. > > Because at SWT we deal with integer arithmetic for sizes and OS uses > floating point arithmetic, we get rounding errors when we calculate sizes. > This causes size discrepancy in cell size and text contained in it. This > causes OS to truncate the tail. > > To fix this we should use NSLineBreakByClipping. Alternatively, you may round up the required cell width. Backported the fix to 4.8, 4.11 and 4.15 maintenance branches. |
Created attachment 284611 [details] Screen shot MacOS Big Sur 11.0.1 beta (20B5012d) When launching a debug session from Eclipse any Tree cell with the longest text is shortened with an ellipsis (...) 1. Launch a debug session of Eclipse from Eclipse to spawn a new instance of Eclipse 2. Open Preferences and observe the tree texts.