Skip to content

Commit 47c4212

Browse files
committed
Revert "This PR removes the only remaining WS_CARBON check from the codebase.The"
This reverts commit cb2fa1d.
1 parent 4a2727c commit 47c4212

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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

Lines changed: 7 additions & 1 deletion
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-
522+
@SuppressWarnings("removal")
523523
private static final void readBindingsFromRegistry(final IConfigurationElement[] configurationElements,
524524
final int configurationElementCount, final BindingManager bindingManager,
525525
final CommandManager commandService) {
@@ -608,6 +608,12 @@ 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));
611617
} else {
612618
bindings.add(binding);
613619
}

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

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

0 commit comments

Comments
 (0)