From 27cda19c9f4259b3a8c83a905069fdb145bf79f2 Mon Sep 17 00:00:00 2001 From: Eclipse Platform Bot Date: Tue, 4 Nov 2025 04:36:47 +0000 Subject: [PATCH] Perform clean code of bundles/org.eclipse.ui.workbench --- .../org/eclipse/ui/IKeyBindingService.java | 4 ++ .../ui/INestableKeyBindingService.java | 3 ++ .../eclipse/ui/actions/OpenNewPageMenu.java | 4 ++ .../eclipse/ui/actions/OpenNewWindowMenu.java | 4 ++ .../ui/actions/OpenPerspectiveMenu.java | 7 +++ .../org/eclipse/ui/contexts/ContextEvent.java | 6 +++ .../eclipse/ui/contexts/ContextException.java | 3 ++ .../ui/contexts/ContextManagerEvent.java | 6 +++ .../ui/contexts/EnabledSubmission.java | 7 +++ .../org/eclipse/ui/contexts/IContext.java | 7 +++ .../eclipse/ui/contexts/IContextListener.java | 1 + .../eclipse/ui/contexts/IContextManager.java | 5 ++ .../ui/contexts/IContextManagerListener.java | 1 + .../ui/contexts/IWorkbenchContextSupport.java | 17 +++++++ .../ui/contexts/NotDefinedException.java | 2 + .../YesNoCancelListSelectionDialog.java | 5 ++ .../ui/fieldassist/ContentAssistField.java | 3 ++ .../org/eclipse/ui/keys/CharacterKey.java | 13 +++++ .../org/eclipse/ui/keys/IKeyFormatter.java | 3 ++ .../eclipseui/org/eclipse/ui/keys/Key.java | 6 +++ .../eclipse/ui/keys/KeyFormatterFactory.java | 5 ++ .../org/eclipse/ui/keys/KeySequence.java | 19 ++++++++ .../org/eclipse/ui/keys/KeyStroke.java | 15 ++++++ .../org/eclipse/ui/keys/ModifierKey.java | 5 ++ .../org/eclipse/ui/keys/NaturalKey.java | 1 + .../org/eclipse/ui/keys/ParseException.java | 1 + .../org/eclipse/ui/keys/SWTKeySupport.java | 7 +++ .../org/eclipse/ui/keys/SpecialKey.java | 48 +++++++++++++++++++ .../ui/model/WorkbenchViewerSorter.java | 3 ++ 29 files changed, 211 insertions(+) diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/IKeyBindingService.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/IKeyBindingService.java index bb47d9ea5d8..b050111124b 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/IKeyBindingService.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/IKeyBindingService.java @@ -43,6 +43,7 @@ public interface IKeyBindingService { * * @return the active accelerator scope ids. */ + @Deprecated String[] getScopes(); /** @@ -50,6 +51,7 @@ public interface IKeyBindingService { * * @param action the action to be registered with the key binding service. */ + @Deprecated void registerAction(IAction action); /** @@ -57,6 +59,7 @@ public interface IKeyBindingService { * * @param scopes the active accelerator scope ids. */ + @Deprecated void setScopes(String[] scopes); /** @@ -64,5 +67,6 @@ public interface IKeyBindingService { * * @param action the action to be unregistered with the key binding service. */ + @Deprecated void unregisterAction(IAction action); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/INestableKeyBindingService.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/INestableKeyBindingService.java index 5a36d67a78a..9431db19b9e 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/INestableKeyBindingService.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/INestableKeyBindingService.java @@ -46,6 +46,7 @@ public interface INestableKeyBindingService extends IKeyBindingService { * case of a null parameter); false if nothing * changed. */ + @Deprecated boolean activateKeyBindingService(IWorkbenchSite nestedSite); /** @@ -58,6 +59,7 @@ public interface INestableKeyBindingService extends IKeyBindingService { * @return The associated service, if any; or a new associated service, if none * existed previously. */ + @Deprecated IKeyBindingService getKeyBindingService(IWorkbenchSite nestedSite); /** @@ -70,6 +72,7 @@ public interface INestableKeyBindingService extends IKeyBindingService { * @return true if the service existed and could be removed; * false otherwise. */ + @Deprecated boolean removeKeyBindingService(IWorkbenchSite nestedSite); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenNewPageMenu.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenNewPageMenu.java index bfcde6cc583..40f0a8f9463 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenNewPageMenu.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenNewPageMenu.java @@ -63,6 +63,7 @@ public class OpenNewPageMenu extends PerspectiveMenu { * @param window the window where a new page is created if an item within the * menu is selected */ + @Deprecated public OpenNewPageMenu(IWorkbenchWindow window) { this(window, null); } @@ -74,11 +75,13 @@ public OpenNewPageMenu(IWorkbenchWindow window) { * menu is selected * @param input the page input */ + @Deprecated public OpenNewPageMenu(IWorkbenchWindow window, IAdaptable input) { super(window, "Open New Page Menu");//$NON-NLS-1$ this.pageInput = input; } + @Deprecated @Override protected void run(IPerspectiveDescriptor desc) { // Verify page input. @@ -102,6 +105,7 @@ protected void run(IPerspectiveDescriptor desc) { * * @param input the page input */ + @Deprecated public void setPageInput(IAdaptable input) { pageInput = input; } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenNewWindowMenu.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenNewWindowMenu.java index a424e7a9a97..3c741f5e666 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenNewWindowMenu.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenNewWindowMenu.java @@ -62,6 +62,7 @@ public class OpenNewWindowMenu extends PerspectiveMenu { * @param window the window where a new page is created if an item within the * menu is selected */ + @Deprecated public OpenNewWindowMenu(IWorkbenchWindow window) { this(window, null); } @@ -73,6 +74,7 @@ public OpenNewWindowMenu(IWorkbenchWindow window) { * menu is selected * @param input the page input */ + @Deprecated public OpenNewWindowMenu(IWorkbenchWindow window, IAdaptable input) { super(window, "Open New Page Menu");//$NON-NLS-1$ this.pageInput = input; @@ -81,6 +83,7 @@ public OpenNewWindowMenu(IWorkbenchWindow window, IAdaptable input) { /** * Opens a new window with a particular perspective and input. */ + @Deprecated @Override protected void run(IPerspectiveDescriptor desc) { // Verify page input. @@ -104,6 +107,7 @@ protected void run(IPerspectiveDescriptor desc) { * * @param input the page input */ + @Deprecated public void setPageInput(IAdaptable input) { pageInput = input; } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenPerspectiveMenu.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenPerspectiveMenu.java index 9ac1244f2c5..b62f849ffc9 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenPerspectiveMenu.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/actions/OpenPerspectiveMenu.java @@ -70,6 +70,7 @@ public class OpenPerspectiveMenu extends PerspectiveMenu { * @param window the window where a new page is created if an item within * the menu is selected */ + @Deprecated public OpenPerspectiveMenu(IMenuManager menuManager, IWorkbenchWindow window) { this(window); this.parentMenuManager = menuManager; @@ -88,6 +89,7 @@ public OpenPerspectiveMenu(IMenuManager menuManager, IWorkbenchWindow window) { * @param window the window where a new page is created if an item within the * menu is selected */ + @Deprecated public OpenPerspectiveMenu(IWorkbenchWindow window) { this(window, null); showActive(true); @@ -100,6 +102,7 @@ public OpenPerspectiveMenu(IWorkbenchWindow window) { * menu is selected * @param input the page input */ + @Deprecated public OpenPerspectiveMenu(IWorkbenchWindow window, IAdaptable input) { super(window, "Open New Page Menu");//$NON-NLS-1$ this.pageInput = input; @@ -129,6 +132,7 @@ private String openPerspectiveSetting() { * * @param desc the selected perspective */ + @Deprecated @Override protected void run(IPerspectiveDescriptor desc) { openPage(desc); @@ -140,6 +144,7 @@ protected void run(IPerspectiveDescriptor desc) { * @param desc the selected perspective * @param event the event sent along with the selection callback */ + @Deprecated @Override protected void run(IPerspectiveDescriptor desc, SelectionEvent event) { openPage(desc); @@ -166,6 +171,7 @@ private void openPage(IPerspectiveDescriptor desc) { * * @param input the page input */ + @Deprecated public void setPageInput(IAdaptable input) { pageInput = input; } @@ -173,6 +179,7 @@ public void setPageInput(IAdaptable input) { /** * @param isEnabled true if replace menu item is enabled within its parent menu. */ + @Deprecated public void setReplaceEnabled(boolean isEnabled) { if (replaceEnabled != isEnabled) { replaceEnabled = isEnabled; diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextEvent.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextEvent.java index d3ce78cbdaf..8a870de3fc6 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextEvent.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextEvent.java @@ -63,6 +63,7 @@ public final class ContextEvent { * @param nameChanged true, iff the name property changed. * @param parentIdChanged true, iff the parentId property changed. */ + @Deprecated public ContextEvent(IContext context, boolean definedChanged, boolean enabledChanged, boolean nameChanged, boolean parentIdChanged) { if (context == null) { @@ -82,6 +83,7 @@ public ContextEvent(IContext context, boolean definedChanged, boolean enabledCha * @return the instance of the interface that changed. Guaranteed not to be * null. */ + @Deprecated public IContext getContext() { return context; } @@ -91,6 +93,7 @@ public IContext getContext() { * * @return true, iff the defined property changed. */ + @Deprecated public boolean hasDefinedChanged() { return definedChanged; } @@ -100,6 +103,7 @@ public boolean hasDefinedChanged() { * * @return true, iff the enabled property changed. */ + @Deprecated public boolean hasEnabledChanged() { return enabledChanged; } @@ -109,6 +113,7 @@ public boolean hasEnabledChanged() { * * @return true, iff the name property changed. */ + @Deprecated public boolean hasNameChanged() { return nameChanged; } @@ -118,6 +123,7 @@ public boolean hasNameChanged() { * * @return true, iff the parentId property changed. */ + @Deprecated public boolean hasParentIdChanged() { return parentIdChanged; } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextException.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextException.java index ca569d52e0e..295df5a5437 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextException.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextException.java @@ -41,6 +41,7 @@ public abstract class ContextException extends Exception { * * @param message the detail message. */ + @Deprecated public ContextException(String message) { super(message); } @@ -52,6 +53,7 @@ public ContextException(String message) { * @param message the detail message. * @param cause the cause. */ + @Deprecated public ContextException(String message, Throwable cause) { super(message); // don't pass the cause to super, to allow compilation against JCL Foundation @@ -65,6 +67,7 @@ public ContextException(String message, Throwable cause) { * @return the cause or null * @since 3.1 */ + @Deprecated @Override public Throwable getCause() { return cause; diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextManagerEvent.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextManagerEvent.java index a9208862ce4..b4d0694212b 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextManagerEvent.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/ContextManagerEvent.java @@ -90,6 +90,7 @@ public final class ContextManagerEvent { * enabledContextIdsChanged is * true. */ + @Deprecated public ContextManagerEvent(IContextManager contextManager, boolean definedContextIdsChanged, boolean enabledContextIdsChanged, Set previouslyDefinedContextIds, Set previouslyEnabledContextIds) { if (contextManager == null) { @@ -127,6 +128,7 @@ public ContextManagerEvent(IContextManager contextManager, boolean definedContex * @return the instance of the interface that changed. Guaranteed not to be * null. */ + @Deprecated public IContextManager getContextManager() { return contextManager; } @@ -141,6 +143,7 @@ public IContextManager getContextManager() { * false and is guaranteed to not be null if * haveDefinedContextIdsChanged() is true. */ + @Deprecated public Set getPreviouslyDefinedContextIds() { return previouslyDefinedContextIds; } @@ -155,6 +158,7 @@ public Set getPreviouslyDefinedContextIds() { * false and is guaranteed to not be null if * haveEnabledContextIdsChanged() is true. */ + @Deprecated public Set getPreviouslyEnabledContextIds() { return previouslyEnabledContextIds; } @@ -164,6 +168,7 @@ public Set getPreviouslyEnabledContextIds() { * * @return true, iff the definedContextIds property changed. */ + @Deprecated public boolean haveDefinedContextIdsChanged() { return definedContextIdsChanged; } @@ -173,6 +178,7 @@ public boolean haveDefinedContextIdsChanged() { * * @return true, iff the enabledContextIds property changed. */ + @Deprecated public boolean haveEnabledContextIdsChanged() { return enabledContextIdsChanged; } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/EnabledSubmission.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/EnabledSubmission.java index beca03ac3c6..10247d97648 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/EnabledSubmission.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/EnabledSubmission.java @@ -91,6 +91,7 @@ public final class EnabledSubmission implements Comparable { * @param contextId the identifier of the context to be enabled. * Must not be null. */ + @Deprecated public EnabledSubmission(String activePartId, Shell activeShell, IWorkbenchPartSite activeWorkbenchPartSite, String contextId) { if (contextId == null) { @@ -106,6 +107,7 @@ public EnabledSubmission(String activePartId, Shell activeShell, IWorkbenchPartS /** * @see Comparable#compareTo(java.lang.Object) */ + @Deprecated @Override public int compareTo(Object object) { EnabledSubmission castedObject = (EnabledSubmission) object; @@ -133,6 +135,7 @@ public int compareTo(Object object) { * @return the identifier of the part that must be active for this request to be * considered. May be null. */ + @Deprecated public String getActivePartId() { return activePartId; } @@ -143,6 +146,7 @@ public String getActivePartId() { * @return the shell that must be active for this request to be considered. May * be null. */ + @Deprecated public Shell getActiveShell() { return activeShell; } @@ -154,6 +158,7 @@ public Shell getActiveShell() { * @return the workbench part site of the part that must be active for this * request to be considered. May be null. */ + @Deprecated public IWorkbenchPartSite getActiveWorkbenchPartSite() { return activeWorkbenchPartSite; } @@ -164,6 +169,7 @@ public IWorkbenchPartSite getActiveWorkbenchPartSite() { * @return the identifier of the context to be enabled. Guaranteed not to be * null. */ + @Deprecated public String getContextId() { return contextId; } @@ -171,6 +177,7 @@ public String getContextId() { /** * @see Object#toString() */ + @Deprecated @Override public String toString() { if (string == null) { diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContext.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContext.java index 6e4745ae4d8..d1aaa2c4733 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContext.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContext.java @@ -52,6 +52,7 @@ public interface IContext extends Comparable { * an instance which is already registered with this * instance, no operation is performed. */ + @Deprecated void addContextListener(IContextListener contextListener); /** @@ -60,6 +61,7 @@ public interface IContext extends Comparable { * @return the identifier of this instance. Guaranteed not to be * null. */ + @Deprecated String getId(); /** @@ -71,6 +73,7 @@ public interface IContext extends Comparable { * @return the name of this instance. Guaranteed not to be null. * @throws NotDefinedException if this instance is not defined. */ + @Deprecated String getName() throws NotDefinedException; /** @@ -83,6 +86,7 @@ public interface IContext extends Comparable { * null. * @throws NotDefinedException if this instance is not defined. */ + @Deprecated String getParentId() throws NotDefinedException; /** @@ -93,6 +97,7 @@ public interface IContext extends Comparable { * * @return true, iff this instance is defined. */ + @Deprecated boolean isDefined(); /** @@ -103,6 +108,7 @@ public interface IContext extends Comparable { * * @return true, iff this instance is enabled. */ + @Deprecated boolean isEnabled(); /** @@ -114,5 +120,6 @@ public interface IContext extends Comparable { * an instance which is not already registered with this * instance, no operation is performed. */ + @Deprecated void removeContextListener(IContextListener contextListener); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextListener.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextListener.java index fee20d2a55d..7cee2f6634d 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextListener.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextListener.java @@ -38,5 +38,6 @@ public interface IContextListener { * @param contextEvent the context event. Guaranteed not to be * null. */ + @Deprecated void contextChanged(ContextEvent contextEvent); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextManager.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextManager.java index 22002f4a540..08feb2f8f4c 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextManager.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextManager.java @@ -45,6 +45,7 @@ public interface IContextManager { * registered with this instance, no operation is * performed. */ + @Deprecated void addContextManagerListener(IContextManagerListener contextManagerListener); /** @@ -53,6 +54,7 @@ public interface IContextManager { * @param contextId an identifier. Must not be null * @return an instance of IContext. */ + @Deprecated IContext getContext(String contextId); /** @@ -68,6 +70,7 @@ public interface IContextManager { * empty, it is guaranteed to only contain instances of * String. */ + @Deprecated SortedSet getDefinedContextIds(); /** @@ -83,6 +86,7 @@ public interface IContextManager { * empty, it is guaranteed to only contain instances of * String. */ + @Deprecated SortedSet getEnabledContextIds(); /** @@ -95,5 +99,6 @@ public interface IContextManager { * registered with this instance, no operation is * performed. */ + @Deprecated void removeContextManagerListener(IContextManagerListener contextManagerListener); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextManagerListener.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextManagerListener.java index e06638436ed..570bf0980d8 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextManagerListener.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IContextManagerListener.java @@ -38,5 +38,6 @@ public interface IContextManagerListener { * @param contextManagerEvent the context manager event. Guaranteed not to be * null. */ + @Deprecated void contextManagerChanged(ContextManagerEvent contextManagerEvent); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IWorkbenchContextSupport.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IWorkbenchContextSupport.java index f4648b7caaf..b764db452e6 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IWorkbenchContextSupport.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/IWorkbenchContextSupport.java @@ -41,18 +41,21 @@ public interface IWorkbenchContextSupport { * The identifier for the context that is active when a shell registered as a * dialog. */ + @Deprecated String CONTEXT_ID_DIALOG = IContextService.CONTEXT_ID_DIALOG; /** * The identifier for the context that is active when a shell is registered as * either a window or a dialog. */ + @Deprecated String CONTEXT_ID_DIALOG_AND_WINDOW = IContextService.CONTEXT_ID_DIALOG_AND_WINDOW; /** * The identifier for the context that is active when a shell is registered as a * window. */ + @Deprecated String CONTEXT_ID_WINDOW = IContextService.CONTEXT_ID_WINDOW; /** @@ -60,6 +63,7 @@ public interface IWorkbenchContextSupport { * a dialog. When the given shell is active, the "In Dialogs" context should * also be active. */ + @Deprecated int TYPE_DIALOG = IContextService.TYPE_DIALOG; /** @@ -68,6 +72,7 @@ public interface IWorkbenchContextSupport { * provide any EnabledSubmission instances for the "In Dialogs" or * "In Windows" contexts. */ + @Deprecated int TYPE_NONE = IContextService.TYPE_NONE; /** @@ -75,6 +80,7 @@ public interface IWorkbenchContextSupport { * a window. When the given shell is active, the "In Windows" context should * also be active. */ + @Deprecated int TYPE_WINDOW = IContextService.TYPE_WINDOW; /** @@ -94,6 +100,7 @@ public interface IWorkbenchContextSupport { * @param enabledSubmission The enabled submission to be considered; must not be * null. */ + @Deprecated void addEnabledSubmission(EnabledSubmission enabledSubmission); /** @@ -116,6 +123,7 @@ public interface IWorkbenchContextSupport { * element in the collection must be an instance of * EnabledSubmission. */ + @Deprecated void addEnabledSubmissions(Collection enabledSubmissions); /** @@ -124,6 +132,7 @@ public interface IWorkbenchContextSupport { * @return the context manager for the workbench. Guaranteed not to be * null. */ + @Deprecated IContextManager getContextManager(); /** @@ -137,6 +146,7 @@ public interface IWorkbenchContextSupport { * IWorkbenchContextSupport.TYPE_NONE. * @since 3.1 */ + @Deprecated int getShellType(final Shell shell); /** @@ -145,6 +155,7 @@ public interface IWorkbenchContextSupport { * @return true if the key bindings are active; false * otherwise. */ + @Deprecated boolean isKeyFilterEnabled(); /** @@ -153,6 +164,7 @@ public interface IWorkbenchContextSupport { * * @since 3.1 */ + @Deprecated void openKeyAssistDialog(); /** @@ -183,6 +195,7 @@ public interface IWorkbenchContextSupport { * @return true if the shell had already been registered (i.e., the * registration has changed); false otherwise. */ + @Deprecated boolean registerShell(final Shell shell, final int type); /** @@ -200,6 +213,7 @@ public interface IWorkbenchContextSupport { * @param enabledSubmission The enabled submission to be removed; must not be * null. */ + @Deprecated void removeEnabledSubmission(EnabledSubmission enabledSubmission); /** @@ -219,6 +233,7 @@ public interface IWorkbenchContextSupport { * must only contain instances of * EnabledSubmission. */ + @Deprecated void removeEnabledSubmissions(Collection enabledSubmissions); /** @@ -235,6 +250,7 @@ public interface IWorkbenchContextSupport { * * @param enabled Whether the key filter should be enabled. */ + @Deprecated void setKeyFilterEnabled(final boolean enabled); /** @@ -255,5 +271,6 @@ public interface IWorkbenchContextSupport { * @return true if the shell had been registered; * false otherwise. */ + @Deprecated boolean unregisterShell(final Shell shell); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/NotDefinedException.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/NotDefinedException.java index 33b993d7e7a..f2da101bef0 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/NotDefinedException.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/contexts/NotDefinedException.java @@ -39,6 +39,7 @@ public final class NotDefinedException extends ContextException { * * @param message the detail message. */ + @Deprecated public NotDefinedException(String message) { super(message); } @@ -49,6 +50,7 @@ public NotDefinedException(String message) { * @param e The exception being thrown; must not be null. * @since 3.1 */ + @Deprecated public NotDefinedException(org.eclipse.core.commands.common.NotDefinedException e) { super(e.getMessage(), e); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java index 8a4822585eb..0d252441d15 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/dialogs/YesNoCancelListSelectionDialog.java @@ -48,6 +48,7 @@ public YesNoCancelListSelectionDialog(org.eclipse.swt.widgets.Shell parentShell, super(parentShell, input, contentProvider, labelProvider, message); } + @Deprecated @Override protected void buttonPressed(int buttonId) { switch (buttonId) { @@ -66,6 +67,7 @@ protected void buttonPressed(int buttonId) { } } + @Deprecated @Override protected void configureShell(Shell shell) { super.configureShell(shell); @@ -73,6 +75,7 @@ protected void configureShell(Shell shell) { IWorkbenchHelpContextIds.YES_NO_CANCEL_LIST_SELECTION_DIALOG); } + @Deprecated @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true); @@ -88,6 +91,7 @@ protected void createButtonsForButtonBar(Composite parent) { * dialog. Subclasses may override if desired. *

*/ + @Deprecated protected void noPressed() { setReturnCode(IDialogConstants.NO_ID); close(); @@ -97,6 +101,7 @@ protected void noPressed() { * Notifies that the yes button of this dialog has been pressed. Do the same as * an OK but set the return code to YES_ID instead. */ + @Deprecated protected void yesPressed() { okPressed(); setReturnCode(IDialogConstants.YES_ID); diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/fieldassist/ContentAssistField.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/fieldassist/ContentAssistField.java index 8d2189919b0..3f3b2c221e0 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/fieldassist/ContentAssistField.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/fieldassist/ContentAssistField.java @@ -75,6 +75,7 @@ public class ContentAssistField extends DecoratedField { * auto-activation of the proposal popup, * regardless of the specified command id. */ + @Deprecated public ContentAssistField(Composite parent, int style, IControlCreator controlCreator, IControlContentAdapter controlContentAdapter, IContentProposalProvider proposalProvider, String commandId, char[] autoActivationCharacters) { @@ -94,6 +95,7 @@ public ContentAssistField(Composite parent, int style, IControlCreator controlCr * to user input, false if it is ignoring user * input. */ + @Deprecated public void setEnabled(boolean enabled) { adapter.setEnabled(enabled); if (enabled) { @@ -137,6 +139,7 @@ private FieldDecoration getFieldDecoration() { * * @return the ContentAssistCommandAdapter installed on the field. */ + @Deprecated public ContentAssistCommandAdapter getContentAssistCommandAdapter() { return adapter; } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/CharacterKey.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/CharacterKey.java index 6e209f1725a..cb72cc26a0f 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/CharacterKey.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/CharacterKey.java @@ -40,66 +40,77 @@ public final class CharacterKey extends NaturalKey { * An internal map used to lookup instances of CharacterKey given * the formal string representation of a character key. */ + @Deprecated static SortedMap characterKeysByName = new TreeMap(); /** * The single static instance of CharacterKey which represents the * backspace key (U+0008). */ + @Deprecated public static final CharacterKey BS; /** * The single static instance of CharacterKey which represents the * carriage return (U+000D) key */ + @Deprecated public static final CharacterKey CR; /** * The single static instance of CharacterKey which represents the * delete (U+007F) key. */ + @Deprecated public static final CharacterKey DEL; /** * The single static instance of CharacterKey which represents the * escape (U+001B) key. */ + @Deprecated public static final CharacterKey ESC; /** * The single static instance of CharacterKey which represents the * form feed (U+000C) key. */ + @Deprecated public static final CharacterKey FF; /** * The single static instance of CharacterKey which represents the * line feed (U+000A) key. */ + @Deprecated public static final CharacterKey LF; /** * The single static instance of CharacterKey which represents the * null (U+0000) key. */ + @Deprecated public static final CharacterKey NUL; /** * The single static instance of CharacterKey which represents the * space (U+0020) key. */ + @Deprecated public static final CharacterKey SPACE; /** * The single static instance of CharacterKey which represents the * tab (U+0009) key. */ + @Deprecated public static final CharacterKey TAB; /** * The single static instance of CharacterKey which represents the * vertical tab (U+000B) key. */ + @Deprecated public static final CharacterKey VT; /** @@ -112,6 +123,7 @@ public final class CharacterKey extends NaturalKey { * instance is to represent. * @return an instance of CharacterKey representing the character. */ + @Deprecated public static CharacterKey getInstance(final char character) { return new CharacterKey(character); } @@ -161,6 +173,7 @@ private CharacterKey(final int key) { * * @return the character that this object represents. */ + @Deprecated public char getCharacter() { return (char) key; } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/IKeyFormatter.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/IKeyFormatter.java index 1a43866ee03..e205f5d5b17 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/IKeyFormatter.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/IKeyFormatter.java @@ -34,6 +34,7 @@ public interface IKeyFormatter { * @param key The key to format; must not be null. * @return The key formatted as a string; should not be null. */ + @Deprecated String format(Key key); /** @@ -46,6 +47,7 @@ public interface IKeyFormatter { * @return A string representation of the key sequence; must not be * null. */ + @Deprecated String format(KeySequence keySequence); /** @@ -57,5 +59,6 @@ public interface IKeyFormatter { * @return A string representation of the key stroke; must not be * null */ + @Deprecated String format(KeyStroke keyStroke); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/Key.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/Key.java index e126ef0aaea..e6978693b7b 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/Key.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/Key.java @@ -50,6 +50,7 @@ public abstract class Key implements Comparable { * The key from which this key was constructed. This value is defined by * KeyLookupFactory.getDefault(). */ + @Deprecated protected final int key; /** @@ -59,6 +60,7 @@ public abstract class Key implements Comparable { * @param key the integer representation of this key, as defined by * KeyLookupFactory.getDefault(). */ + @Deprecated Key(final int key) { this.key = key; } @@ -66,11 +68,13 @@ public abstract class Key implements Comparable { /** * @see java.lang.Comparable#compareTo(java.lang.Object) */ + @Deprecated @Override public final int compareTo(final Object object) { return Util.compare(key, ((Key) object).key); } + @Deprecated @Override public final boolean equals(final Object object) { if (!(object instanceof Key)) { @@ -80,6 +84,7 @@ public final boolean equals(final Object object) { return key == ((Key) object).key; } + @Deprecated @Override public final int hashCode() { return Objects.hashCode(key); @@ -91,6 +96,7 @@ public final int hashCode() { * @return The formal string representation for this key. Guaranteed not to be * null. */ + @Deprecated @Override public final String toString() { final IKeyLookup lookup = KeyLookupFactory.getDefault(); diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeyFormatterFactory.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeyFormatterFactory.java index 6f59c3ed633..0c4348bd40d 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeyFormatterFactory.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeyFormatterFactory.java @@ -42,6 +42,7 @@ public final class KeyFormatterFactory { * * @return The compact formatter; never null. */ + @Deprecated public static IKeyFormatter getCompactKeyFormatter() { return COMPACT_KEY_FORMATTER; } @@ -51,6 +52,7 @@ public static IKeyFormatter getCompactKeyFormatter() { * * @return The default formatter; never null. */ + @Deprecated public static IKeyFormatter getDefault() { return defaultKeyFormatter; } @@ -60,6 +62,7 @@ public static IKeyFormatter getDefault() { * * @return The Xemacs formatter; never null. */ + @Deprecated public static IKeyFormatter getEmacsKeyFormatter() { return EMACS_KEY_FORMATTER; } @@ -69,6 +72,7 @@ public static IKeyFormatter getEmacsKeyFormatter() { * * @return The formal formatter; never null. */ + @Deprecated public static IKeyFormatter getFormalKeyFormatter() { return FORMAL_KEY_FORMATTER; } @@ -79,6 +83,7 @@ public static IKeyFormatter getFormalKeyFormatter() { * @param defaultKeyFormatter the default key formatter. Must not be * null. */ + @Deprecated public static void setDefault(IKeyFormatter defaultKeyFormatter) { if (defaultKeyFormatter == null) { throw new NullPointerException(); diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeySequence.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeySequence.java index 235e4a73045..8251ea58930 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeySequence.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeySequence.java @@ -56,6 +56,7 @@ public final class KeySequence implements Comparable { * expressed in the formal key stroke grammar. This is not to be displayed to * the user. It is only intended as an internal representation. */ + @Deprecated public static final String KEY_STROKE_DELIMITER = "\u0020"; //$NON-NLS-1$ /** @@ -77,6 +78,7 @@ public final class KeySequence implements Comparable { * The set of delimiters for KeyStroke objects allowed during * parsing of the formal string representation. */ + @Deprecated public static final String KEY_STROKE_DELIMITERS = KEY_STROKE_DELIMITER + "\b\r\u007F\u001B\f\n\0\t\u000B"; //$NON-NLS-1$ /** @@ -85,6 +87,7 @@ public final class KeySequence implements Comparable { * @return a key sequence. This key sequence will have no key strokes. * Guaranteed not to be null. */ + @Deprecated public static KeySequence getInstance() { return EMPTY_KEY_SEQUENCE; } @@ -99,6 +102,7 @@ public static KeySequence getInstance() { * key stroke appended to the end. Guaranteed not to be * null. */ + @Deprecated public static KeySequence getInstance(KeySequence keySequence, KeyStroke keyStroke) { if (keySequence == null || keyStroke == null) { throw new NullPointerException(); @@ -115,6 +119,7 @@ public static KeySequence getInstance(KeySequence keySequence, KeyStroke keyStro * @param keyStroke a single key stroke. Must not be null. * @return a key sequence. Guaranteed not to be null. */ + @Deprecated public static KeySequence getInstance(KeyStroke keyStroke) { return new KeySequence(Collections.singletonList(keyStroke)); } @@ -127,6 +132,7 @@ public static KeySequence getInstance(KeyStroke keyStroke) { * null elements. * @return a key sequence. Guaranteed not to be null. */ + @Deprecated public static KeySequence getInstance(KeyStroke[] keyStrokes) { return new KeySequence(Arrays.asList(keyStrokes)); } @@ -139,6 +145,7 @@ public static KeySequence getInstance(KeyStroke[] keyStrokes) { * it must only contain instances of KeyStroke. * @return a key sequence. Guaranteed not to be null. */ + @Deprecated public static KeySequence getInstance(List keyStrokes) { return new KeySequence(keyStrokes); } @@ -150,6 +157,7 @@ public static KeySequence getInstance(List keyStrokes) { * sequence; must not be null. * @return a key sequence; never null. */ + @Deprecated public static KeySequence getInstance(final org.eclipse.jface.bindings.keys.KeySequence newKeySequence) { final org.eclipse.jface.bindings.keys.KeyStroke[] newKeyStrokes = newKeySequence.getKeyStrokes(); final int newKeyStrokesCount = newKeyStrokes.length; @@ -173,6 +181,7 @@ public static KeySequence getInstance(final org.eclipse.jface.bindings.keys.KeyS * @throws ParseException if the given formal string representation could not be * parsed to a valid key sequence. */ + @Deprecated public static KeySequence getInstance(String string) throws ParseException { if (string == null) { throw new NullPointerException(); @@ -232,6 +241,7 @@ private KeySequence(List keyStrokes) { } } + @Deprecated @Override public int compareTo(Object object) { KeySequence castedObject = (KeySequence) object; @@ -247,6 +257,7 @@ public int compareTo(Object object) { * @return true, iff the given key sequence ends with this key * sequence. */ + @Deprecated public boolean endsWith(KeySequence keySequence, boolean equals) { if (keySequence == null) { throw new NullPointerException(); @@ -255,6 +266,7 @@ public boolean endsWith(KeySequence keySequence, boolean equals) { return Util.endsWith(keyStrokes, keySequence.keyStrokes, equals); } + @Deprecated @Override public boolean equals(Object object) { if (!(object instanceof KeySequence)) { @@ -270,6 +282,7 @@ public boolean equals(Object object) { * @return A string representation for this key sequence using the default look; * never null. */ + @Deprecated public String format() { return KeyFormatterFactory.getDefault().format(this); } @@ -281,10 +294,12 @@ public String format() { * guaranteed not to be null. If this list is not empty, it * is guaranteed to only contain instances of KeyStroke. */ + @Deprecated public List getKeyStrokes() { return keyStrokes; } + @Deprecated @Override public int hashCode() { if (!hashCodeComputed) { @@ -302,6 +317,7 @@ public int hashCode() { * * @return true, iff the key sequence is complete. */ + @Deprecated public boolean isComplete() { return keyStrokes.isEmpty() || keyStrokes.get(keyStrokes.size() - 1).isComplete(); } @@ -312,6 +328,7 @@ public boolean isComplete() { * * @return true, iff the key sequence is empty. */ + @Deprecated public boolean isEmpty() { return keyStrokes.isEmpty(); } @@ -325,6 +342,7 @@ public boolean isEmpty() { * @return true, iff the given key sequence starts with this key * sequence. */ + @Deprecated public boolean startsWith(KeySequence keySequence, boolean equals) { if (keySequence == null) { throw new NullPointerException(); @@ -339,6 +357,7 @@ public boolean startsWith(KeySequence keySequence, boolean equals) { * @return The formal string representation for this key sequence. Guaranteed * not to be null. */ + @Deprecated @Override public String toString() { return KeyFormatterFactory.getFormalKeyFormatter().format(this); diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeyStroke.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeyStroke.java index 199e669491e..9d05da66389 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeyStroke.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/KeyStroke.java @@ -62,6 +62,7 @@ public final class KeyStroke implements Comparable { * the formal key stroke grammar. This is not to be displayed to the user. It is * only intended as an internal representation. */ + @Deprecated public static final String KEY_DELIMITER = "\u002B"; //$NON-NLS-1$ /** @@ -78,6 +79,7 @@ public final class KeyStroke implements Comparable { * The set of delimiters for Key objects allowed during parsing of * the formal string representation. */ + @Deprecated public static final String KEY_DELIMITERS = KEY_DELIMITER; /** @@ -88,6 +90,7 @@ public final class KeyStroke implements Comparable { * @param naturalKey the natural key. May be null. * @return a key stroke. Guaranteed not to be null. */ + @Deprecated public static KeyStroke getInstance(ModifierKey modifierKey, NaturalKey naturalKey) { if (modifierKey == null) { throw new NullPointerException(); @@ -106,6 +109,7 @@ public static KeyStroke getInstance(ModifierKey modifierKey, NaturalKey naturalK * @param naturalKey the natural key. May be null. * @return a key stroke. Guaranteed not to be null. */ + @Deprecated public static KeyStroke getInstance(ModifierKey[] modifierKeys, NaturalKey naturalKey) { Util.assertInstance(modifierKeys, ModifierKey.class); return new KeyStroke(new TreeSet<>(Arrays.asList(modifierKeys)), naturalKey); @@ -118,6 +122,7 @@ public static KeyStroke getInstance(ModifierKey[] modifierKeys, NaturalKey natur * @return a key stroke. This key stroke will have no modifier keys. Guaranteed * not to be null. */ + @Deprecated public static KeyStroke getInstance(NaturalKey naturalKey) { return new KeyStroke(Collections.unmodifiableSortedSet(new TreeSet<>()), naturalKey); } @@ -133,6 +138,7 @@ public static KeyStroke getInstance(NaturalKey naturalKey) { * @param naturalKey the natural key. May be null. * @return a key stroke. Guaranteed not to be null. */ + @Deprecated public static KeyStroke getInstance(SortedSet modifierKeys, NaturalKey naturalKey) { return new KeyStroke(modifierKeys, naturalKey); } @@ -146,6 +152,7 @@ public static KeyStroke getInstance(SortedSet modifierKeys, NaturalKey naturalKe * @throws ParseException if the given formal string representation could not be * parsed to a valid key stroke. */ + @Deprecated public static KeyStroke getInstance(String string) throws ParseException { if (string == null) { throw new NullPointerException(); @@ -247,6 +254,7 @@ private KeyStroke(SortedSet modifierKeys, NaturalKey naturalKey) { /** * @see java.lang.Comparable#compareTo(java.lang.Object) */ + @Deprecated @Override public int compareTo(Object object) { KeyStroke castedObject = (KeyStroke) object; @@ -259,6 +267,7 @@ public int compareTo(Object object) { return compareTo; } + @Deprecated @Override public boolean equals(Object object) { if (!(object instanceof KeyStroke castedObject)) { @@ -277,6 +286,7 @@ public boolean equals(Object object) { * @return A string representation for this key stroke using the default look; * never null. */ + @Deprecated public String format() { return KeyFormatterFactory.getDefault().format(this); } @@ -288,6 +298,7 @@ public String format() { * not to be null. If this set is not empty, it is * guaranteed to only contain instances of ModifierKey. */ + @Deprecated public Set getModifierKeys() { return Collections.unmodifiableSet(modifierKeys); } @@ -297,10 +308,12 @@ public Set getModifierKeys() { * * @return the natural key. May be null. */ + @Deprecated public NaturalKey getNaturalKey() { return naturalKey; } + @Deprecated @Override public int hashCode() { if (!hashCodeComputed) { @@ -319,6 +332,7 @@ public int hashCode() { * * @return true, iff the key stroke is complete. */ + @Deprecated public boolean isComplete() { return naturalKey != null; } @@ -329,6 +343,7 @@ public boolean isComplete() { * @return The formal string representation for this key stroke. Guaranteed not * to be null. */ + @Deprecated @Override public String toString() { return KeyFormatterFactory.getFormalKeyFormatter().format(this); diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/ModifierKey.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/ModifierKey.java index 617a223eba2..e1675982938 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/ModifierKey.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/ModifierKey.java @@ -43,24 +43,28 @@ public final class ModifierKey extends Key { * An internal map used to lookup instances of ModifierKey given * the formal string representation of a modifier key. */ + @Deprecated static SortedMap modifierKeysByName = new TreeMap<>(); /** * The single static instance of ModifierKey which represents the * 'Alt' key. */ + @Deprecated public static final ModifierKey ALT; /** * The single static instance of ModifierKey which represents the * 'Command' key. */ + @Deprecated public static final ModifierKey COMMAND; /** * The single static instance of ModifierKey which represents the * 'Ctrl' key. */ + @Deprecated public static final ModifierKey CTRL; /** @@ -87,6 +91,7 @@ public final class ModifierKey extends Key { * The single static instance of ModifierKey which represents the * 'Shift' key. */ + @Deprecated public static final ModifierKey SHIFT; static { diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/NaturalKey.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/NaturalKey.java index 804e3b0d343..7be5c906fdb 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/NaturalKey.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/NaturalKey.java @@ -40,6 +40,7 @@ public abstract class NaturalKey extends Key { * * @param key The key to be wrapped. */ + @Deprecated NaturalKey(final int key) { super(key); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/ParseException.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/ParseException.java index 77311539b19..646062b1bb1 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/ParseException.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/ParseException.java @@ -42,6 +42,7 @@ public final class ParseException extends Exception { * * @param s the detail message. */ + @Deprecated public ParseException(final String s) { super(s); } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/SWTKeySupport.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/SWTKeySupport.java index 5618c6f3c8c..05cd887a6c5 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/SWTKeySupport.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/SWTKeySupport.java @@ -38,6 +38,7 @@ public final class SWTKeySupport { * accelerator value. * @return The equivalent key stroke; never null. */ + @Deprecated public static KeyStroke convertAcceleratorToKeyStroke(int accelerator) { final SortedSet modifierKeys = new TreeSet<>(); NaturalKey naturalKey; @@ -220,6 +221,7 @@ public static KeyStroke convertAcceleratorToKeyStroke(int accelerator) { * @param event The event to be converted; must not be null. * @return The combination of the state mask and the unmodified character. */ + @Deprecated public static int convertEventToModifiedAccelerator(Event event) { int modifiers = event.stateMask & SWT.MODIFIER_MASK; char character = topKey(event); @@ -241,6 +243,7 @@ public static int convertEventToModifiedAccelerator(Event event) { * @param event The event to be converted; must not be null. * @return The combination of the state mask and the unmodified character. */ + @Deprecated public static int convertEventToUnmodifiedAccelerator(Event event) { return convertEventToUnmodifiedAccelerator(event.stateMask, event.keyCode); } @@ -282,6 +285,7 @@ private static int convertEventToUnmodifiedAccelerator(int stateMask, int keyCod * @param event The event to be converted; must not be null. * @return The combination of the state mask and the unmodified character. */ + @Deprecated public static int convertEventToUnmodifiedAccelerator(KeyEvent event) { return convertEventToUnmodifiedAccelerator(event.stateMask, event.keyCode); } @@ -296,6 +300,7 @@ public static int convertEventToUnmodifiedAccelerator(KeyEvent event) { * @return The combination of the state mask without shift, and the modified * character. */ + @Deprecated public static int convertEventToUnshiftedModifiedAccelerator(Event event) { // Disregard alphabetic key strokes. if (Character.isLetter((char) event.keyCode)) { @@ -314,6 +319,7 @@ public static int convertEventToUnshiftedModifiedAccelerator(Event event) { * @param keyStroke The key stroke to convert; must not be null. * @return The SWT accelerator value */ + @Deprecated public static int convertKeyStrokeToAccelerator(final KeyStroke keyStroke) { int accelerator = 0; final Iterator iterator = keyStroke.getModifierKeys().iterator(); @@ -394,6 +400,7 @@ public static int convertKeyStrokeToAccelerator(final KeyStroke keyStroke) { * @return an instance of IKeyFormatter appropriate for the current * instance; never null. */ + @Deprecated public static IKeyFormatter getKeyFormatterForPlatform() { return NATIVE_FORMATTER; } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/SpecialKey.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/SpecialKey.java index b412023c2a1..8a8ac127cd2 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/SpecialKey.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/keys/SpecialKey.java @@ -44,288 +44,336 @@ public final class SpecialKey extends NaturalKey { * An internal map used to lookup instances of SpecialKey given the * formal string representation of a special key. */ + @Deprecated static SortedMap specialKeysByName = new TreeMap<>(); /** * The single static instance of SpecialKey which represents the * 'Arrow Down' key. */ + @Deprecated public static final SpecialKey ARROW_DOWN; /** * The single static instance of SpecialKey which represents the * 'Arrow Left' key. */ + @Deprecated public static final SpecialKey ARROW_LEFT; /** * The single static instance of SpecialKey which represents the * 'Arrow Right' key. */ + @Deprecated public static final SpecialKey ARROW_RIGHT; /** * The single static instance of SpecialKey which represents the * 'Arrow Up' key. */ + @Deprecated public static final SpecialKey ARROW_UP; /** * The single static instance of SpecialKey which represents the * 'Break' key. */ + @Deprecated public static final SpecialKey BREAK; /** * The single static instance of SpecialKey which represents the * 'Caps Lock' key. */ + @Deprecated public static final SpecialKey CAPS_LOCK; /** * The single static instance of SpecialKey which represents the * 'End' key. */ + @Deprecated public static final SpecialKey END; /** * The single static instance of SpecialKey which represents the * 'F1' key. */ + @Deprecated public static final SpecialKey F1; /** * The single static instance of SpecialKey which represents the * 'F10' key. */ + @Deprecated public static final SpecialKey F10; /** * The single static instance of SpecialKey which represents the * 'F11' key. */ + @Deprecated public static final SpecialKey F11; /** * The single static instance of SpecialKey which represents the * 'F12' key. */ + @Deprecated public static final SpecialKey F12; /** * The single static instance of SpecialKey which represents the * 'F13' key. */ + @Deprecated public static final SpecialKey F13; /** * The single static instance of SpecialKey which represents the * 'F14' key. */ + @Deprecated public static final SpecialKey F14; /** * The single static instance of SpecialKey which represents the * 'F15' key. */ + @Deprecated public static final SpecialKey F15; /** * The single static instance of SpecialKey which represents the * 'F2' key. */ + @Deprecated public static final SpecialKey F2; /** * The single static instance of SpecialKey which represents the * 'F3' key. */ + @Deprecated public static final SpecialKey F3; /** * The single static instance of SpecialKey which represents the * 'F4' key. */ + @Deprecated public static final SpecialKey F4; /** * The single static instance of SpecialKey which represents the * 'F5' key. */ + @Deprecated public static final SpecialKey F5; /** * The single static instance of SpecialKey which represents the * 'F6' key. */ + @Deprecated public static final SpecialKey F6; /** * The single static instance of SpecialKey which represents the * 'F7' key. */ + @Deprecated public static final SpecialKey F7; /** * The single static instance of SpecialKey which represents the * 'F8' key. */ + @Deprecated public static final SpecialKey F8; /** * The single static instance of SpecialKey which represents the * 'F9' key. */ + @Deprecated public static final SpecialKey F9; /** * The single static instance of SpecialKey which represents the * 'Home' key. */ + @Deprecated public static final SpecialKey HOME; /** * The single static instance of SpecialKey which represents the * 'Insert' key. */ + @Deprecated public static final SpecialKey INSERT; /** * The single static instance of SpecialKey which represents the * 'NumLock' key. */ + @Deprecated public static final SpecialKey NUM_LOCK; /** * The single static instance of SpecialKey which represents the * '0' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_0; /** * The single static instance of SpecialKey which represents the * '1' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_1; /** * The single static instance of SpecialKey which represents the * '2' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_2; /** * The single static instance of SpecialKey which represents the * '3' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_3; /** * The single static instance of SpecialKey which represents the * '4' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_4; /** * The single static instance of SpecialKey which represents the * '5' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_5; /** * The single static instance of SpecialKey which represents the * '6' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_6; /** * The single static instance of SpecialKey which represents the * '7' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_7; /** * The single static instance of SpecialKey which represents the * '8' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_8; /** * The single static instance of SpecialKey which represents the * '9' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_9; /** * The single static instance of SpecialKey which represents the * 'Add' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_ADD; /** * The single static instance of SpecialKey which represents the * 'Decimal' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_DECIMAL; /** * The single static instance of SpecialKey which represents the * 'Divide' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_DIVIDE; /** * The single static instance of SpecialKey which represents the * 'Enter' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_ENTER; /** * The single static instance of SpecialKey which represents the * '=' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_EQUAL; /** * The single static instance of SpecialKey which represents the * 'Multiply' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_MULTIPLY; /** * The single static instance of SpecialKey which represents the * 'Subtract' key on the numpad. */ + @Deprecated public static final SpecialKey NUMPAD_SUBTRACT; /** * The single static instance of SpecialKey which represents the * 'Page Down' key. */ + @Deprecated public static final SpecialKey PAGE_DOWN; /** * The single static instance of SpecialKey which represents the * 'Page Up' key. */ + @Deprecated public static final SpecialKey PAGE_UP; /** * The single static instance of SpecialKey which represents the * 'Pause' key. */ + @Deprecated public static final SpecialKey PAUSE; /** * The single static instance of SpecialKey which represents the * 'Print Screen' key. */ + @Deprecated public static final SpecialKey PRINT_SCREEN; /** * The single static instance of SpecialKey which represents the * 'Scroll Lock' key. */ + @Deprecated public static final SpecialKey SCROLL_LOCK; static { diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/model/WorkbenchViewerSorter.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/model/WorkbenchViewerSorter.java index fab3ad6d689..92e5c5ffd48 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/model/WorkbenchViewerSorter.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/model/WorkbenchViewerSorter.java @@ -32,6 +32,7 @@ public class WorkbenchViewerSorter extends ViewerSorter { /** * Creates a workbench viewer sorter using the default collator. */ + @Deprecated public WorkbenchViewerSorter() { super(); } @@ -41,10 +42,12 @@ public WorkbenchViewerSorter() { * * @param collator the collator to use to sort strings */ + @Deprecated public WorkbenchViewerSorter(Collator collator) { super(collator); } + @Deprecated @Override public boolean isSorterProperty(Object element, String propertyId) { return propertyId.equals(IBasicPropertyConstants.P_TEXT);