Skip to content

Drop the unused className parameter of SWT_AWT.initFrame - #3719

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
GreenFuze:drop-initframe-classname
Oct 26, 2026
Merged

akurtakov merged 1 commit into
eclipse-platform:masterfrom
GreenFuze:drop-initframe-classname

Conversation

@GreenFuze

@GreenFuze GreenFuze commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3665.

As you suggested, initFrame no longer takes className. None of the natives ever read it (each one always creates the platform's default embedded frame class), and the GTK native didn't even declare it.

SWT_AWT.embeddedFrameClass is now deprecated for removal (since 2026-12), following the API removal process. I kept its Class.forName check, so nothing changes for code that still sets it. On Cocoa, JDK17_FRAME was only used as that default, so it's gone too.

Like in #3526, I didn't touch Library.java or the binaries -- the C change needs the natives rebuilt. Happy to adjust anything!

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

 1 026 files  ±0   1 026 suites  ±0   1h 34m 15s ⏱️ + 9m 48s
 5 067 tests ±0   5 039 ✅ ±0     28 💤 ±0  0 ❌ ±0 
29 761 runs  ±0  27 225 ✅ ±0  2 536 💤 ±0  0 ❌ ±0 

Results for commit 779e7a5. ± Comparison against base commit fcc15be.

♻️ This comment has been updated with latest results.

@GreenFuze

Copy link
Copy Markdown
Contributor Author

Heads up: API tools treats adding @noreference to an existing public field as an API break (it reports the field as "no longer an API" and wants a major version bump), which is why the builds failed. So I dropped @noreference and kept the @Deprecated(forRemoval = true, since = "2026-12") deprecation. If you'd rather keep @noreference, I can add API filters to the binary fragments instead, just say.

@GreenFuze

Copy link
Copy Markdown
Contributor Author

All GitHub builds pass now. The Jenkins job timed out twice at ~2h, I think in the native-build stage (this PR touches the cocoa and win32 natives). Could someone re-run it when the native build agents are free?

Comment thread bundles/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java Outdated
@akurtakov

Copy link
Copy Markdown
Member

Please change the natives too. The C part will be auto rebuilt by the CI.

@akurtakov
akurtakov force-pushed the drop-initframe-classname branch 4 times, most recently from 073fc7b to 5165be9 Compare October 16, 2026 11:34
@GreenFuze

Copy link
Copy Markdown
Contributor Author

@akurtakov both points are in:

  • @noreference is back on embeddedFrameClass, with an API tools filter (id 338940029) in each binary fragment's .api_filters (5165be9). My inline reply said cc2c5a7; that commit became 5165be9 when I rebased.
  • The natives are changed: the cocoa and win32 swt_awt.c no longer take className (813566f), and the GTK native never declared it. I left Library.java and the binaries for the CI rebuild, as you said.

All GitHub builds are green. The Jenkins run on the current head was aborted again after about 2 hours, like the earlier ones. Could someone re-run it, or let me know if there's anything else on my side?

@akurtakov
akurtakov force-pushed the drop-initframe-classname branch from 5165be9 to f6c9d17 Compare October 23, 2026 15:31
@akurtakov

Copy link
Copy Markdown
Member

Rebasing on top of master does all you have asked for, I did it now. I would appreciate if you squash all the comments into single commit.

@akurtakov

Copy link
Copy Markdown
Member

Sorry for the delay! There are so many things ongoing and so less times that PRs easily get lost.

@akurtakov
akurtakov force-pushed the drop-initframe-classname branch from f6c9d17 to 35b60f6 Compare October 26, 2026 15:02
@akurtakov

Copy link
Copy Markdown
Member

So far this is blocked by infrastructure problem https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/work_items/8008 . If natives on windows can't be rebuild I can't merge this change

None of the natives reads it: each one always creates the platform's
default embedded frame class (XEmbeddedFrame, CViewEmbeddedFrame,
WEmbeddedFrame), and the GTK native did not declare it at all.

SWT_AWT.embeddedFrameClass, whose value was passed as className, is
deprecated for removal and marked @noreference accordingly, with the
resulting "field is no longer an API" problem (id 338940029) filtered in
each binary fragment's .api_filters. Its Class.forName check is kept, so
nothing changes for code that still sets it.

Fixes eclipse-platform#3665

Signed-off-by: TCs <green.fuzer@gmail.com>
Assisted-by: Anthropic Claude Code (claude-opus-5-5)
@akurtakov
akurtakov force-pushed the drop-initframe-classname branch from 35b60f6 to 779e7a5 Compare October 26, 2026 18:44
@akurtakov
akurtakov merged commit 9eacd60 into eclipse-platform:master Oct 26, 2026
22 checks passed
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.

SWT_AWT.initFrame takes (long, String) in Java; the GTK native declares no className and the Cocoa native types it const char *

2 participants