Community
Participate
Working Groups
I believe that the implementation for bug 538991 caused a regression for org.eclipse.swt.browser.Browser instances that use the SWT.NO_BACKGROUND style, since SWT.EDGE has the same value (1<<18, erroneously listed as 1<<16 in the javadoc). This leads to e.g. the SpotBugs Bug Info view trying to use the experimental WebView2 on Windows, due to setting SWT.NO_BACKGROUND: https://github.com/spotbugs/spotbugs/blob/master/eclipsePlugin/src/de/tobject/findbugs/view/BugInfoView.java#L189 Which results in an exception "Not implemented [WebView2 runtime not found]" if WebView2 is not available.
Oh, this is unfortunate. With this constant being part of a stable release I'm not sure if changing it is possible. Anyway, SWT.NO_BACKGROUND isn't a valid style for the Browser widget, so an easy work-around is to simply remove it.
Thanks for the analysis. I filed https://github.com/spotbugs/spotbugs/issues/1477 downstream. The Composite documentation clearly says that using NO_BACKGROUND is undefined for other subclasses than Canvas, so I guess it could be considered a latent bug in the SpotBugs code to use it.
(In reply to Mikael Sterner from comment #0) > I believe that the implementation for bug 538991 caused a regression for > org.eclipse.swt.browser.Browser instances that use the SWT.NO_BACKGROUND > style, since SWT.EDGE has the same value (1<<18, erroneously listed as 1<<16 > in the javadoc). Good catch, we need to fix this JavaDoc here. Will submit gerrit shortly.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/178840
(In reply to Nikita Nemkin from comment #1) > Oh, this is unfortunate. With this constant being part of a stable release > I'm not sure if changing it is possible. > > Anyway, SWT.NO_BACKGROUND isn't a valid style for the Browser widget, so an > easy work-around is to simply remove it. (In reply to Mikael Sterner from comment #2) > Thanks for the analysis. I filed > https://github.com/spotbugs/spotbugs/issues/1477 downstream. The Composite > documentation clearly says that using NO_BACKGROUND is undefined for other > subclasses than Canvas, so I guess it could be considered a latent bug in > the SpotBugs code to use it. Thanks Nikita/Mikael for sorting this part.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/178840 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=13749c8685a91914b093fa8acab8759c3aa53f31
NO more actions needed form SWT side on this bug, closing.
Verified on master using Eclipse Build id: I20210406-1800