diff --git a/binaries/org.eclipse.swt.cocoa.macosx.aarch64/.settings/.api_filters b/binaries/org.eclipse.swt.cocoa.macosx.aarch64/.settings/.api_filters index 26140701a05..8e36bfa1a20 100644 --- a/binaries/org.eclipse.swt.cocoa.macosx.aarch64/.settings/.api_filters +++ b/binaries/org.eclipse.swt.cocoa.macosx.aarch64/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/binaries/org.eclipse.swt.cocoa.macosx.x86_64/.settings/.api_filters b/binaries/org.eclipse.swt.cocoa.macosx.x86_64/.settings/.api_filters index 10e610b0d1e..1bd4ec099fc 100644 --- a/binaries/org.eclipse.swt.cocoa.macosx.x86_64/.settings/.api_filters +++ b/binaries/org.eclipse.swt.cocoa.macosx.x86_64/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/binaries/org.eclipse.swt.gtk.linux.aarch64/.settings/.api_filters b/binaries/org.eclipse.swt.gtk.linux.aarch64/.settings/.api_filters index af63f67d3e5..8c90971b9c6 100644 --- a/binaries/org.eclipse.swt.gtk.linux.aarch64/.settings/.api_filters +++ b/binaries/org.eclipse.swt.gtk.linux.aarch64/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/binaries/org.eclipse.swt.gtk.linux.loongarch64/.settings/.api_filters b/binaries/org.eclipse.swt.gtk.linux.loongarch64/.settings/.api_filters index 902cb214dd0..d1d863d92d2 100644 --- a/binaries/org.eclipse.swt.gtk.linux.loongarch64/.settings/.api_filters +++ b/binaries/org.eclipse.swt.gtk.linux.loongarch64/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/binaries/org.eclipse.swt.gtk.linux.ppc64le/.settings/.api_filters b/binaries/org.eclipse.swt.gtk.linux.ppc64le/.settings/.api_filters index 63de024cfda..5fc0f0192b5 100644 --- a/binaries/org.eclipse.swt.gtk.linux.ppc64le/.settings/.api_filters +++ b/binaries/org.eclipse.swt.gtk.linux.ppc64le/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/binaries/org.eclipse.swt.gtk.linux.riscv64/.settings/.api_filters b/binaries/org.eclipse.swt.gtk.linux.riscv64/.settings/.api_filters index 4e308700c96..e663d401747 100644 --- a/binaries/org.eclipse.swt.gtk.linux.riscv64/.settings/.api_filters +++ b/binaries/org.eclipse.swt.gtk.linux.riscv64/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/binaries/org.eclipse.swt.gtk.linux.x86_64/.settings/.api_filters b/binaries/org.eclipse.swt.gtk.linux.x86_64/.settings/.api_filters index f80dfb5553d..34c43585299 100644 --- a/binaries/org.eclipse.swt.gtk.linux.x86_64/.settings/.api_filters +++ b/binaries/org.eclipse.swt.gtk.linux.x86_64/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/binaries/org.eclipse.swt.win32.win32.aarch64/.settings/.api_filters b/binaries/org.eclipse.swt.win32.win32.aarch64/.settings/.api_filters index 453427c7a5f..5d317551f90 100644 --- a/binaries/org.eclipse.swt.win32.win32.aarch64/.settings/.api_filters +++ b/binaries/org.eclipse.swt.win32.win32.aarch64/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/binaries/org.eclipse.swt.win32.win32.x86_64/.settings/.api_filters b/binaries/org.eclipse.swt.win32.win32.x86_64/.settings/.api_filters index c29e6dd3417..da485fb2ea1 100644 --- a/binaries/org.eclipse.swt.win32.win32.x86_64/.settings/.api_filters +++ b/binaries/org.eclipse.swt.win32.win32.x86_64/.settings/.api_filters @@ -1,5 +1,13 @@ + + + + + + + + diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c b/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c index 7a020520217..84940e0b7fd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c @@ -20,7 +20,7 @@ #ifndef NO_initFrame JNIEXPORT jobject JNICALL Java_org_eclipse_swt_awt_SWT_1AWT_initFrame - (JNIEnv *env, jclass that, jlong handle, const char *className) + (JNIEnv *env, jclass that, jlong handle) { jobject object; jmethodID constructor; diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java index a145efbc315..c76f07fbd6c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java @@ -47,7 +47,13 @@ public class SWT_AWT { /** * The name of the embedded Frame class. The default class name * for the platform will be used if null. + * + * @noreference This field is not intended to be referenced by clients. + * @deprecated The class named here is never instantiated: the platform's + * default embedded Frame class is always used. This field will + * be removed in a future release. */ + @Deprecated(forRemoval = true, since = "2026-12") public static String embeddedFrameClass; /** @@ -61,11 +67,9 @@ public class SWT_AWT { */ static final String RUN_AWT_INVOKE_LATER_KEY = "org.eclipse.swt.internal.runAWTInvokeLater"; //$NON-NLS-1$ - static final String JDK17_FRAME = "sun.lwawt.macosx.CViewEmbeddedFrame"; - static boolean loaded, swingInitialized; - static native final Object initFrame (long handle, String className); + static native final Object initFrame (long handle); static native final void validateWithBounds (Frame frame, int x, int y, int w, int h); static native final void synthesizeWindowActivation (Frame frame, boolean doActivate); @@ -135,10 +139,9 @@ public static Frame new_Frame(final Composite parent) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } final long handle = parent.view.id; - final String className = embeddedFrameClass != null ? embeddedFrameClass : JDK17_FRAME; try { if (embeddedFrameClass != null) { - Class.forName(className); + Class.forName(embeddedFrameClass); } loadLibrary(); } catch (ClassNotFoundException cne) { @@ -158,7 +161,7 @@ public static Frame new_Frame(final Composite parent) { public void run() { if (run) return; run = true; - Object obj = initFrame(handle, className); + Object obj = initFrame(handle); if (obj == null || !(obj instanceof Frame)) { exception [0] = new Throwable("[Error while creating AWT embedded frame]"); SWT.error (SWT.ERROR_UNSPECIFIED, exception[0]); diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java index dc52885fc42..150ac310ec3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java @@ -46,7 +46,13 @@ public class SWT_AWT { /** * The name of the embedded Frame class. The default class name * for the platform will be used if null. + * + * @noreference This field is not intended to be referenced by clients. + * @deprecated The class named here is never instantiated: the platform's + * default embedded Frame class is always used. This field will + * be removed in a future release. */ + @Deprecated(forRemoval = true, since = "2026-12") public static String embeddedFrameClass; /** @@ -59,7 +65,7 @@ public class SWT_AWT { static native final long getAWTHandle (Object canvas); static native final void setDebug (Frame canvas, boolean debug); -static native final Object initFrame (long handle, String className); +static native final Object initFrame (long handle); static native final void validateWithBounds (Frame frame, int x, int y, int w, int h); static native final void synthesizeWindowActivation (Frame frame, boolean doActivate); static native final void registerListeners (Frame frame); @@ -155,10 +161,9 @@ public static Frame new_Frame (final Composite parent) { * and other JREs take a long. To handle this binary incompatibility, use * reflection to create the embedded frame. */ - String className = embeddedFrameClass != null ? embeddedFrameClass : "sun.awt.X11.XEmbeddedFrame"; try { if (embeddedFrameClass != null) { - Class.forName(className); + Class.forName(embeddedFrameClass); } loadLibrary(); } catch (ClassNotFoundException cne) { @@ -168,7 +173,7 @@ public static Frame new_Frame (final Composite parent) { } initializeSwing (); final Frame [] frame = new Frame [1]; - Object object = initFrame(handle, className); + Object object = initFrame(handle); if (object == null || !(object instanceof Frame)) { SWT.error (SWT.ERROR_UNSPECIFIED , new Throwable(), " [Error while starting AWT]"); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c index 1dfae1691b5..d22a027bd2e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/library/swt_awt.c @@ -59,10 +59,9 @@ JNIEXPORT jlong JNICALL SWT_AWT_NATIVE(getAWTHandle) #ifndef NO_initFrame JNIEXPORT jobject JNICALL SWT_AWT_NATIVE(initFrame) - (JNIEnv *env, jclass that, jlong handle, jstring className) + (JNIEnv *env, jclass that, jlong handle) { /* Suppress warnings about unreferenced parameters */ - (void)className; (void)that; jobject object; diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java index 796d1724e58..26259aa865b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java @@ -42,7 +42,13 @@ public class SWT_AWT { /** * The name of the embedded Frame class. The default class name * for the platform will be used if null. + * + * @noreference This field is not intended to be referenced by clients. + * @deprecated The class named here is never instantiated: the platform's + * default embedded Frame class is always used. This field will + * be removed in a future release. */ + @Deprecated(forRemoval = true, since = "2026-12") public static String embeddedFrameClass; /** @@ -54,7 +60,7 @@ public class SWT_AWT { static boolean loaded, swingInitialized; static native final long getAWTHandle (Canvas canvas); -static native final Object initFrame (long handle, String className); +static native final Object initFrame (long handle); static native final void synthesizeWindowActivation (Frame frame, boolean doActivate); static synchronized void loadLibrary () { @@ -141,10 +147,9 @@ public static Frame new_Frame (final Composite parent) { * and other JREs take a long. To handle this binary incompatibility, use * reflection to create the embedded frame. */ - String className = embeddedFrameClass != null ? embeddedFrameClass : "sun.awt.windows.WEmbeddedFrame"; try { if (embeddedFrameClass != null) { - Class.forName(className); + Class.forName(embeddedFrameClass); } loadLibrary(); } catch (ClassNotFoundException cne) { @@ -154,7 +159,7 @@ public static Frame new_Frame (final Composite parent) { return; } initializeSwing (); - Object value = initFrame(handle, className); + Object value = initFrame(handle); if (value == null || !(value instanceof Frame)) { exception [0] = new Throwable("[Error while creating AWT embedded frame]"); SWT.error (SWT.ERROR_UNSPECIFIED, exception[0]);