Community
Participate
Working Groups
The Snippet9 causes a NPE: Exception in thread "main" java.lang.NullPointerException at org.eclipse.swt.snippets.Snippet9.main(Snippet9.java:40) The cause of this is that getHorizontalBar() returns null. This worked fine on SWT 4.12. did not test on 4.13 Scrolling in general works, its just that in this snippet it doesn't. Since Snippet9 is the snippet to show how scrolling works, this should be fixed. Environment: - Windows 10 - Java 13
Good catch! 4.13 should be broken as well. A regression of bug 293230. Scrollbars should be created dependent of the flag SEARCH (used by Text). It is implemented in Scrollable and Shell is also a scrollable and unfortunately the flag MIN (used by Shell) has the same value as SEARCH. So the check for SEARCH influence the creation of shell with MIN (which is included in SHELL_TRIM). After the reason is known I allow me to update the bug summary. I'll upload a fix proposal (not yet fully tested).
New Gerrit change created: https://git.eclipse.org/r/155078
Gerrit change https://git.eclipse.org/r/155078 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=177d09222472784fed8041424acb681e280366cf
Fixed in master now.
Verified in Eclipse SDK Version: 2020-03 (4.15) Build id: I20200106-1805 OS: Windows 7 Java version: 12