From 6b936faa7946a2389278698645a5403612f6ae4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Thu, 15 Feb 2024 13:26:15 +0100 Subject: [PATCH] deprecate org.eclipse.ui.keys for removal (except IBindingService) Those classes have been deprecated with Bug 82854 (memory issues), replacing Objects with primitives.They are only used internal in org.eclipse.ui.internal.keys and tests https://bugs.eclipse.org/bugs/show_bug.cgi?id=82854 --- .../Eclipse UI/org/eclipse/ui/keys/CharacterKey.java | 3 +-- .../Eclipse UI/org/eclipse/ui/keys/IKeyFormatter.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/Key.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/KeyFormatterFactory.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/KeySequence.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/KeyStroke.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/ModifierKey.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/NaturalKey.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/ParseException.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java | 2 +- .../Eclipse UI/org/eclipse/ui/keys/SpecialKey.java | 2 +- .../org/eclipse/ui/tests/keys/Bug42035Test.java | 1 + .../org/eclipse/ui/tests/keys/Bug43800Test.java | 1 + .../ui/tests/multipageeditor/MultiPageKeyBindingTest.java | 1 + 14 files changed, 14 insertions(+), 12 deletions(-) diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/CharacterKey.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/CharacterKey.java index 9adc0bbed65..6e209f1725a 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/CharacterKey.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/CharacterKey.java @@ -16,7 +16,6 @@ import java.util.SortedMap; import java.util.TreeMap; - import org.eclipse.jface.bindings.keys.IKeyLookup; import org.eclipse.jface.bindings.keys.KeyLookupFactory; @@ -34,7 +33,7 @@ * org.eclipse.jface.bindings.keys.KeyLookupFactory * @since 3.0 */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public final class CharacterKey extends NaturalKey { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IKeyFormatter.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IKeyFormatter.java index 09f4bd2ccb1..1a43866ee03 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IKeyFormatter.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IKeyFormatter.java @@ -23,7 +23,7 @@ * @deprecated Please use org.eclipse.jface.bindings.keys.IKeyFormatter * @since 3.0 */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public interface IKeyFormatter { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/Key.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/Key.java index 954d4571fbc..e126ef0aaea 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/Key.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/Key.java @@ -43,7 +43,7 @@ * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public abstract class Key implements Comparable { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyFormatterFactory.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyFormatterFactory.java index 1fd9e3818fe..6f59c3ed633 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyFormatterFactory.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyFormatterFactory.java @@ -27,7 +27,7 @@ * @since 3.0 * @see org.eclipse.ui.keys.IKeyFormatter */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public final class KeyFormatterFactory { private static final IKeyFormatter COMPACT_KEY_FORMATTER = new CompactKeyFormatter(); diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeySequence.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeySequence.java index 31abf803d4d..70addd831c9 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeySequence.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeySequence.java @@ -48,7 +48,7 @@ * @deprecated Please use org.eclipse.jface.bindings.keys.KeySequence * @since 3.0 */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public final class KeySequence implements Comparable { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyStroke.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyStroke.java index 11a56830d76..b8392331d60 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyStroke.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/KeyStroke.java @@ -54,7 +54,7 @@ * @see org.eclipse.ui.keys.ModifierKey * @see org.eclipse.ui.keys.NaturalKey */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public final class KeyStroke implements Comparable { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ModifierKey.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ModifierKey.java index 24b831438df..617a223eba2 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ModifierKey.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ModifierKey.java @@ -36,7 +36,7 @@ * @since 3.0 * @see org.eclipse.ui.keys.NaturalKey */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public final class ModifierKey extends Key { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/NaturalKey.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/NaturalKey.java index d1dea6fc0c1..804e3b0d343 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/NaturalKey.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/NaturalKey.java @@ -32,7 +32,7 @@ * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public abstract class NaturalKey extends Key { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ParseException.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ParseException.java index fbef9ca63ad..77311539b19 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ParseException.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/ParseException.java @@ -27,7 +27,7 @@ * @deprecated Please use org.eclipse.jface.bindings.keys.ParseException * @since 3.0 */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public final class ParseException extends Exception { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java index b6c56625035..3870ece6b7d 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SWTKeySupport.java @@ -28,7 +28,7 @@ * @deprecated Please use {@link org.eclipse.jface.bindings.keys.SWTKeySupport} * @since 3.0 */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public final class SWTKeySupport { /** diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SpecialKey.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SpecialKey.java index 05a78ef72bc..b412023c2a1 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SpecialKey.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/SpecialKey.java @@ -37,7 +37,7 @@ * org.eclipse.jface.bindings.keys.KeyLookupFactory * @since 3.0 */ -@Deprecated +@Deprecated(forRemoval = true, since = "2024-03") public final class SpecialKey extends NaturalKey { /** diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug42035Test.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug42035Test.java index 325b268b7f3..bb6972935d3 100644 --- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug42035Test.java +++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug42035Test.java @@ -28,6 +28,7 @@ * * @since 3.0 */ +@SuppressWarnings("removal") public class Bug42035Test { /** diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43800Test.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43800Test.java index 904ea5e28ef..619b9cdae7f 100644 --- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43800Test.java +++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/Bug43800Test.java @@ -26,6 +26,7 @@ * * @since 3.0 */ +@SuppressWarnings("removal") public class Bug43800Test { /** diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageKeyBindingTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageKeyBindingTest.java index f2a61f6b089..5686e65b3f6 100644 --- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageKeyBindingTest.java +++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/multipageeditor/MultiPageKeyBindingTest.java @@ -40,6 +40,7 @@ * * @since 3.0 */ +@SuppressWarnings("removal") @RunWith(JUnit4.class) @Ignore("Focus issues, see Commit c28efd634f53c9de7bb31b756ffc755b8faf0ffe") public class MultiPageKeyBindingTest extends UITestCase {