Bug 516548 - Mark deprecated classes from org.eclipse.ui.keys package for deletion
Summary: Mark deprecated classes from org.eclipse.ui.keys package for deletion
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.8 M7   Edit
Assignee: Matthias Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2017-05-12 01:41 EDT by Lars Vogel CLA
Modified: 2018-05-15 09:32 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2017-05-12 01:41:42 EDT

    
Comment 1 Matthias Becker CLA 2018-02-01 07:19:24 EST
The deprecated classes are:

CharacterKey
IKeyFormatter
Key
KeyFormatterFactory
KeySequence
KeyStroke
ModifierKey
NaturalKey
ParseException
SpecialKey
SWTKeySupport

The only class that is not deprecated is IBindingService.java.

I found following usages in platform and jdt:

CharacterKey
  MacKeyFormatter
  NativeKeyFormatter

IKeyFormatter
  AbstractKeyFormatter.java (implementation of interface
  KeyFormatterFactory.java (also deprecated)

Key
  AbstractInformationControl.java
  AbstractInformationControl.java
  AbstractKeyFormatter.java
  Bug36420Test.java
  Bug42035Test.java
  CommandLegacyWrapper.java
  CommandManagerLegacyWrapper.java
  CompactKeyFormatter.java
  EmacsKeyFormatter.java
  FormalKeyFormatter.java
  HierarchyInformationControl.java
  HierarchyInformationControl.java
  ICommandManager.java
  IKeySequenceBinding.java
  JavaOutlineInformationControl.java
  JavaOutlineInformationControl.java
  KdeKeyFormatter.java
  KeySequenceBinding.java
  MacKeyFormatter.java
  MultiPageKeyBindingTest.java
  NativeKeyFormatter.java
  WorkbenchCommandSupport.java

KeyFormatterFactory
  WorkbenchCommandSupport.java

KeySequence
 AbstractInformationControl.java
 AbstractInformationControl.java
 AbstractKeyFormatter.java
 Bug36420Test.java
 CommandLegacyWrapper.java
 CommandManagerLegacyWrapper.java
 CompactKeyFormatter.java
 EmacsKeyFormatter.java
 FormalKeyFormatter.java
 HierarchyInformationControl.java
 HierarchyInformationControl.java
 ICommandManager.java
 IKeySequenceBinding.java
 JavaOutlineInformationControl.java
 JavaOutlineInformationControl.java
 KdeKeyFormatter.java
 KeySequenceBinding.java
 MacKeyFormatter.java
 MultiPageKeyBindingTest.java
 NativeKeyFormatter.java

KeyStroke
 AbstractKeyFormatter.java
 Bug42035Test.java
 CompactKeyFormatter.java
 EmacsKeyFormatter.java
 FormalKeyFormatter.java
 KdeKeyFormatter.java
 NativeKeyFormatter.java

ModifierKey
 AbstractKeyFormatter.java
 AbstractModifierKeyComparator.java
 AlphabeticModifierKeyComparator.java
 CompactKeyFormatter.java
 EmacsKeyFormatter.java
 KdeKeyFormatter.java
 KeyStroke.java
 MacKeyFormatter.java
 NativeKeyFormatter.java
 NativeModifierKeyComparator.java

NaturalKey
 AbstractKeyFormatter.java
 CompactKeyFormatter.java
 KeyStroke.java
 ModifierKey.java

ParseException
 Bug42035Test.java
 CommandManagerLegacyWrapper.java
 MultiPageKeyBindingTest.java

SpecialKey
 MacKeyFormatter.java
 NativeKeyFormatter.java

SWTKeySupport
 Bug42035Test.java
 Bug43800Test.java
 HierarchyInformationControl.java
 HierarchyInformationControl.java
 JavaOutlineInformationControl.java
 JavaOutlineInformationControl.java
 WorkbenchCommandSupport.java

Should we first remove these usages?
Comment 2 Alexander Kurtakov CLA 2018-02-01 07:51:32 EST
(In reply to Matthias Becker from comment #1)
> 
> Should we first remove these usages?

We can not delete these classes until these are gone so I would say yes.
Comment 3 Eclipse Genie CLA 2018-02-01 08:59:30 EST
New Gerrit change created: https://git.eclipse.org/r/116536
Comment 4 Lars Vogel CLA 2018-02-01 09:18:12 EST
(In reply to Alexander Kurtakov from comment #2)
> (In reply to Matthias Becker from comment #1)
> > 
> > Should we first remove these usages?
> 
> We can not delete these classes until these are gone so I would say yes.

+1 in general but sometimes the classes are still used for compatibility reasons and tests. If we need to support them until final deletion, it might not be possible to remove all usage.
Comment 5 Matthias Becker CLA 2018-02-01 09:44:53 EST
(In reply to Lars Vogel from comment #4)
> (In reply to Alexander Kurtakov from comment #2)
> > (In reply to Matthias Becker from comment #1)
> > > 
> > > Should we first remove these usages?
> > 
> > We can not delete these classes until these are gone so I would say yes.
> 
> +1 in general but sometimes the classes are still used for compatibility
> reasons and tests. If we need to support them until final deletion, it might
> not be possible to remove all usage.

see my gerrit https://git.eclipse.org/r/116536 that tries to remove the usages of SWTKeySupport in platform code
Comment 6 Alexander Kurtakov CLA 2018-02-01 09:49:54 EST
(In reply to Lars Vogel from comment #4)
> (In reply to Alexander Kurtakov from comment #2)
> > (In reply to Matthias Becker from comment #1)
> > > 
> > > Should we first remove these usages?
> > 
> > We can not delete these classes until these are gone so I would say yes.
> 
> +1 in general but sometimes the classes are still used for compatibility
> reasons and tests. If we need to support them until final deletion, it might
> not be possible to remove all usage.

I ask for that as in some cases there are additional things identified for deprecation and removal in the process and if found late the period extends again as they were not announced. I have experienced this first hand with the update.configurator. Thus starting migration as early as possible helps finishing the task in time without too much drama.
Comment 8 Lars Vogel CLA 2018-02-14 05:09:13 EST
Matthias, any more usage of these classes?
Comment 9 Matthias Becker CLA 2018-02-14 08:57:27 EST
the java doc does not help me in knowing how to replace the deprecated classes.
E.g. for Key is says:

 * @deprecated Please use org.eclipse.jface.bindings.keys.KeyStroke and
 *             org.eclipse.jface.bindings.keys.KeyLookupFactory

Is there somewhere a guide that tells me hove to changes calls to the deprecated classes with calls to the new api classes?
Comment 10 Matthias Becker CLA 2018-02-14 09:00:22 EST
some of the usages are located in the "Eclipse UI Tests" src folder in org.eclipse.uitest? what is that used for? Do they need to be adapted es well?
Comment 11 Eclipse Genie CLA 2018-02-27 10:02:12 EST
New Gerrit change created: https://git.eclipse.org/r/118271
Comment 12 Eclipse Genie CLA 2018-02-27 10:04:25 EST
New Gerrit change created: https://git.eclipse.org/r/118272
Comment 14 Dani Megert CLA 2018-05-10 10:23:05 EDT
What's the status of this? Is it done?
Comment 15 Dani Megert CLA 2018-05-15 09:32:03 EDT
(In reply to Dani Megert from comment #14)
> What's the status of this? Is it done?

Please reopen if it's not fixed.