Skip to content

Commit 9022be6

Browse files
committed
This PR removes the only remaining WS_CARBON check from the codebase.The
Carbon backend is no longer used or supported in SWT, as all modern macOS environments use the Cocoa backend (WS_COCOA). This check is now obsolete and can be removed. (#2964)
1 parent 6c10cbf commit 9022be6

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/keys/BindingPersistence.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,12 +608,6 @@ private static final void readBindingsFromRegistry(final IConfigurationElement[]
608608

609609
if (Util.WS_COCOA.equals(platform)) {
610610
cocoaTempList.add(binding);
611-
} else if (Util.WS_CARBON.equals(platform)) {
612-
bindings.add(binding);
613-
// temp work around ... simply honour the carbon
614-
// bindings for cocoa.
615-
cocoaTempList.add(new KeyBinding(keySequence, parameterizedCommand, schemeId, contextId, locale,
616-
Util.WS_COCOA, null, Binding.SYSTEM));
617611
} else {
618612
bindings.add(binding);
619613
}

tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,7 @@ public final void testSinglePlatform() throws Exception {
173173
}
174174
}
175175
}
176-
if (Util.WS_CARBON.equals(SWT.getPlatform())
177-
|| Util.WS_COCOA.equals(SWT.getPlatform())) {
178-
assertEquals(2, numAboutBindings);
179-
} else {
176+
if (Util.WS_COCOA.equals(SWT.getPlatform())) {
180177
assertEquals(1, numAboutBindings);
181178
}
182179
}

0 commit comments

Comments
 (0)