Skip to content

[macOS] Replace deprecated NSCell.h constants with non-deprecated replacements#3304

Merged
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:replace-deprecated-nscell-constants
May 30, 2026
Merged

[macOS] Replace deprecated NSCell.h constants with non-deprecated replacements#3304
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:replace-deprecated-nscell-constants

Conversation

@HeikoKlare
Copy link
Copy Markdown
Contributor

Summary

Replaces deprecated macOS constants originating from NSCell.h with their non-deprecated replacements, as documented in the macOS 15.4 SDK.

All replaced constants have been deprecated since macOS 10.0–10.14 (see NSCell.h in the macOS SDK).

Control Sizes (NSControlSize)

Old constant Replacement
NSRegularControlSize NSControlSizeRegular
NSSmallControlSize NSControlSizeSmall
NSMiniControlSize NSControlSizeMini

Control States (NSControlStateValue)

Old constant Replacement
NSOffState NSControlStateValueOff
NSOnState NSControlStateValueOn
NSMixedState NSControlStateValueMixed

Image Scaling (NSImageScaling)

Old constant Replacement
NSScaleNone NSImageScaleNone

Changed Files

  • OS.java — constant declarations renamed
  • AppKitFull.bridgesupport.extras — enum entries updated
  • Widget classes with usages updated: Button, Control, DateTime, Display, Label, MenuItem, Scrollable, Slider, Spinner, TabFolder, Table, Tree

Notes

This change was done with the help of Claude (Anthropic's AI assistant).

Contributes to #3214

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Test Results (macos)

   58 files  ±  0     58 suites  ±0   6m 57s ⏱️ + 1m 55s
4 571 tests ±  0  4 324 ✅ ±  0  247 💤 ± 0  0 ❌ ±0 
2 202 runs  +111  2 138 ✅ +100   64 💤 +11  0 ❌ ±0 

Results for commit 8997964. ± Comparison against base commit e95edb8.

♻️ This comment has been updated with latest results.

…lacements

Replace the following deprecated macOS constants from NSCell.h:
- NSRegularControlSize -> NSControlSizeRegular
- NSSmallControlSize -> NSControlSizeSmall
- NSMiniControlSize -> NSControlSizeMini
- NSOffState -> NSControlStateValueOff
- NSOnState -> NSControlStateValueOn
- NSMixedState -> NSControlStateValueMixed
- NSScaleNone -> NSImageScaleNone

Update constant declarations in OS.java, the bridgesupport extras file,
and all usages across the affected widget classes.

Contributes to eclipse-platform#3214

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@HeikoKlare HeikoKlare force-pushed the replace-deprecated-nscell-constants branch from f6b8177 to 8997964 Compare May 30, 2026 09:11
@HeikoKlare HeikoKlare merged commit 081b313 into eclipse-platform:master May 30, 2026
19 checks passed
@HeikoKlare HeikoKlare deleted the replace-deprecated-nscell-constants branch May 30, 2026 09:51
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.

1 participant