Skip to content

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

Open
HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:replace-deprecated-nscell-constants
Open

[macOS] Replace deprecated NSCell.h constants with non-deprecated replacements#3304
HeikoKlare wants to merge 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

…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>
@github-actions
Copy link
Copy Markdown
Contributor

Test Results (macos)

   58 files  ±0     58 suites  ±0   9m 50s ⏱️ + 2m 10s
4 571 tests ±0  4 324 ✅ ±0  247 💤 ±0  0 ❌ ±0 
2 202 runs  ±0  2 138 ✅ ±0   64 💤 ±0  0 ❌ ±0 

Results for commit f6b8177. ± Comparison against base commit f33b79e.

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