Skip to content

Conversation

@tnikolai2
Copy link
Contributor

Lambda expressions are replaced by classes because GraalVM Native Image does not support the use of lambda expressions in jni callback functions.

Also need add to jni-config.json:

[
  {
    "name": "org.eclipse.swt.browser.Edge$HandleCoreWebView2SwtCallback",
    "methods": [
      {
        "name": "Invoke",
        "parameterTypes": ["long", "long"]
      }
    ]
  },
  {
    "name": "org.eclipse.swt.browser.Edge$HandleCoreWebView2SwtHost",
    "methods": [
      {
        "name": "CallJava",
        "parameterTypes": ["int", "long", "long"]
      }
    ]
  }
]

tnikolai2 and others added 30 commits April 19, 2025 10:25
Also need add to jni-config.json:
[
  {
    "name": "org.eclipse.swt.browser.Edge$HandleCoreWebView2SwtCallback",
    "methods": [
      {
        "name": "Invoke",
        "parameterTypes": ["long", "long"]
      }
    ]
  },
  {
    "name": "org.eclipse.swt.browser.Edge$HandleCoreWebView2SwtHost",
    "methods": [
      {
        "name": "CallJava",
        "parameterTypes": ["int", "long", "long"]
      }
    ]
  }
]
This commit contributes to fixing the infinite looping effect on
painting a tooltip over a TreeItem on win32 when a tooltip spans
over two monitors having more area on the other monitor than the one
on which the cursor is placed. The fix makes sure that the tooltip
is not drawn on the other monitors by shifting or adjusting the width.

Fixes #557
This commit addresses issues, when DnD across multiple monitors with
monitors specific scaling is used. If the monitors have different zoom
dragging into a table or tree on the second monitor will detect the wrong
destination items depending on the zoom. To address this the zoom should
always be inherited from the underlying control if available.
This commit adds a wrapper for images created with an existing OS handle
to ensure all existing image constructors are tied to a final wrapper
instance.
This commit extends the logic when a Rectangle is scaled up/down from points
to pixels regarding width and height.

Fixes #2003
It's a noop on cairo for quite some time and allows cleaning up code.
Handles remaining widgets code. Continuation of
#2058
When initializing the SVGFileFormat class for loading SVGs, the current
context classloader is used by the ServiceLoader to find an
SVGRasterizer implementation. This classloader may be incorrect in some
cases, i.e., it may not be the plain system classloader or an according
OSGi classloader but, e.g., some specific classloader for test
execution.

This change makes the ServiceLoader use the same classloader for finding
an SVGRasterizer implementation than the classloader of the
SVGFileFormat class containing the rasterizer reference itself.

Fixes #1965

Fixes #2049
This commit refactors Image in the win32 implementation as
Image#imageProvider is final and always != null now. With this the handling
and creation of new handles and ImageData was unified.
This commit unifies the extraction of the target zoom of a font to be
affected by the zoom context of the underlying Widget. Before there
were different strategies like getting it from the Shell.
This commit contributes to moving the logic for scaling the ImageData
using GC from DPIUtil to Image for each platform and DPIUtil calls the
platform specific code from the method DPIUtil:autoScaleImageData.

contributes to
#62 and
#127
This commit extends the SWTFontProvider and the SWTFontRegistry to
receive scaled variants of a font where only the handle is available.
Common use case for this is OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0)
to receive the handle of the current font of a handle. As at this point
the correct zoom the handle was created is not yet know, it is better
to retrieve and manage those fonts via the SWTFontRegistry expecially
when monitor specific scaling is used. When the passed font handle is
not already managed via the SWTFontRegistry it will create the SWT Font
as it was create previously.
Due to the on-demand creation of image handles, there is not necessarily
a handles anymore from which image data is retrieved when requesting is
via the getImageData(...) methods. This results in potentially different
kinds of image data (including different anti-aliasing results)
depending on whether a handle has already been created for an image at
the given zoom or not.

This change adapts the implementation of Image based on static ImageData
and streams to always use the image data retrieved from a native handle.
To this end, it temporarily creates a handle if necessary. In order to
avoid repeated loading and handle creation for the same source of image,
a cache for the already retrieved image data is introduced.

Fixes #2052
This commit replaces several calls to Font#handle to use the
SWTFontProvider instead. This assures the most Font reusage possible.
This commit reverts moving the initialization of GCData.font in
Composite#WM_Paint in commit 033d733.

Fixes #2066
This commit moves some initialization checks related to ImageFileNameProvider into the matching

This commit moves some initialization checks related to
ImageFileNameProvider into the matching Wrapper implementation. It also
fixes when an IllegalArgumentException is thrown by the initialization
to conform to the constructor' contract.
This commit moves the code that is equal to all AbstractImageProviderWrapper
implementations back to Image.
The o.e.swt.tools* bundles have 2 completely different roles. They used
to live in the same bundle back in the days and these reexports were
added to preserve backward compatibility.
If we want to progress with
#2068
we have to finally make the separation clearer. Note that the swt.tools
feature still include both.
This commit move the cleanup of OS handle of images from Image to the
subclass Image#ImageHandle.
This commit extends the usage of ImageGcDraware to support SWT.Transparency
as style that will initialize each GC with a proper transparent
bitmap.
This commit adapts the smooth scaling implementation to use
ImageGcDrawer.
Ensure that the applicable implementation fragments are available for
svg fragment
Part of
eclipse-platform/eclipse.platform.releng.aggregator#3006
akurtakov and others added 24 commits June 1, 2025 06:43
Makes it easier to view the text as it appears in the launcher.
This commit adapts the zoom passed to the GC when it is initialized for
a plain Image created via Image#Image(Device, int, int) with a given width
and height. It will fall back to DPIUtil#getDeviceZoom() again to revert
to original bevahiour and prevent blurry rescaling of old usages.
When copying an image based on an input stream, the copied provider
wrapper was erroneously created on the original image. This change
adapts the instantiation to create the warpper on the correct image.

Fixes #2188
Bumps [EnricoMi/publish-unit-test-result-action](https://github.com/enricomi/publish-unit-test-result-action) from 2.19.0 to 2.20.0.
- [Release notes](https://github.com/enricomi/publish-unit-test-result-action/releases)
- [Commits](EnricoMi/publish-unit-test-result-action@afb2984...3a74b29)

---
updated-dependencies:
- dependency-name: EnricoMi/publish-unit-test-result-action
  dependency-version: 2.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Use the Eclipse Platform Bot to commit built SWT binaries with its
correct email as recorded in the EF-API (https://api.eclipse.org/bots )
and that is also associated with it's Github account.
Before the Eclipse Releng Bot was used for that, but with an incorrect
email.

Fixes
- https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/6227
It simply doesn't exist there thus causes a number of CRITICAL/WARNING.
PocketPC and JavaXPCom are dead technologies - no need to special
handling them.
Catch only IOExceptions (rather than Exception)
Some unit test classes in the Win32 fragment are declared as public.
This is unnecessary and may lead to them being erroneously being
considered in the API baseline.
This commit fixes the test
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.test_setTextContainingScript_applicationLayerProgressListenerMustSeeUpToDateDom()
as Edge seems to misbehave sporadically when an invalid script source is
added using Edge:setText. Hence, with this commit we replace the
script tag with a valid statement in the test and enable it.

Contributes to #1843
When dragging and dropping a file from the Package Explorer or a
field/method from the Outline view, the dragged item appears at an
incorrect zoom level. Thats because the zoom for DragSource was not
updated on zoom change and we use that zoom in DragListener to update
the size of the imageList.
Previously, when copying an image in the clipboard example, the image at
the current zoom level was stored to clipboard using
getImageDataAtCurrentZoom(). However, in normal Windows behavior (e.g.,
Paint), images are always copied at their original size regardless of
the current zoom. When pasting, the image is pasted at 100% zoom, and
the application handles zoom internally when displaying the image.

To match this behavior, copy and paste now always handle images at 100%
scale, ignoring the current zoom and leaving zoom handling to the image
class when it is fetched for display.
Internal usages of SWTEventListener have been removed but the API
filters have only been adapted for the Linux x86 fragment. This change
removes the obsolete API filters for all other fragments.
This commit adds relevant loggings for debugging purposes to the
Browser tests which sporadically fail for Edge Browser.

contributes to #2098, #2113 and #2063
@merks
Copy link
Contributor

merks commented Jun 7, 2025

Someone is going to ask you to squash these changes and force push them because we can't merge merge commits.

@tnikolai2
Copy link
Contributor Author

Someone is going to ask you to squash these changes and force push them because we can't merge merge commits.

I don't have write access to the repository, so I can't force push.

@merks
Copy link
Contributor

merks commented Jun 7, 2025

You force push to your fork's branch, i.e., to

https://github.com/tnikolai2/eclipse.platform.swt/tree/patch-1

That updates this PR.

@tnikolai2

Are you using the IDE (EGit) to create the PR?

@HannesWell Do we have a good link that explains the detailed steps?

@tnikolai2 tnikolai2 closed this Jun 7, 2025
@tnikolai2 tnikolai2 deleted the patch-1 branch June 7, 2025 21:07
@tnikolai2
Copy link
Contributor Author

__

You force push to your fork's branch, i.e., to

https://github.com/tnikolai2/eclipse.platform.swt/tree/patch-1

That updates this PR.

@tnikolai2

Are you using the IDE (EGit) to create the PR?

@HannesWell Do we have a good link that explains the detailed steps?

Something went wrong, I recreated the Pull Request - #2216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.