Skip to content

Commit cb2fa1d

Browse files
elsazacvogella
authored andcommitted
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 634e5f0 commit cb2fa1d

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ private static final void readBindingsFromPreferences(final IMemento preferences
519519
* @param commandService The command service for the workbench; must
520520
* not be <code>null</code>.
521521
*/
522-
@SuppressWarnings("removal")
522+
523523
private static final void readBindingsFromRegistry(final IConfigurationElement[] configurationElements,
524524
final int configurationElementCount, final BindingManager bindingManager,
525525
final CommandManager commandService) {
@@ -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)