Bug 531739 - Remove usage of deprecated classes
Summary: Remove usage of deprecated classes
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 4.8 M6   Edit
Assignee: Matthias Becker CLA
QA Contact: Till Brychcy CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-27 09:00 EST by Matthias Becker CLA
Modified: 2018-03-01 01:16 EST (History)
1 user (show)

See Also:


Attachments
Screencast showing the issue (27.98 KB, image/png)
2018-02-27 09:00 EST, Matthias Becker CLA
no flags Details
Screenshot with the fix (27.40 KB, image/png)
2018-02-27 09:03 EST, Matthias Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Becker CLA 2018-02-27 09:00:54 EST
Created attachment 272906 [details]
Screencast showing the issue

On macOS the key binding that is shown in the status bar of the quick outline and the type hiearchy is not formatted correctly.
It is "Command+O" but instead of the word "Command" it should use the command-symbol "⌘" so it's "⌘+O". Also see attached screenshot.
Comment 1 Eclipse Genie CLA 2018-02-27 09:03:10 EST
New Gerrit change created: https://git.eclipse.org/r/118259
Comment 2 Matthias Becker CLA 2018-02-27 09:03:48 EST
Created attachment 272907 [details]
Screenshot with the fix

The fix btw. also removes the usage of some deprecated classes
Comment 3 Till Brychcy CLA 2018-02-27 09:36:09 EST
I can confirm that this is broken in I20180226-2000, but it worked at least in I20180124-2000, so this is actually a regression and somebody should find out what broke this.
Comment 4 Matthias Becker CLA 2018-02-27 09:43:33 EST
(In reply to Till Brychcy from comment #3)
> I can confirm that this is broken in I20180226-2000, but it worked at least
> in I20180124-2000, so this is actually a regression and somebody should find
> out what broke this.

Good point.
Anyway my change removes some usages of deprecated classes.
Comment 5 Matthias Becker CLA 2018-02-27 09:56:51 EST
(In reply to Till Brychcy from comment #3)
> I can confirm that this is broken in I20180226-2000, but it worked at least
> in I20180124-2000, so this is actually a regression and somebody should find
> out what broke this.

I found it. It's my change: https://git.eclipse.org/r/#/c/116536/
So what's wrong with my change? Do we have to keep that deprecated usage in WorkbenchCommandSupport until it get's removed? Or what's the correct fix?
Comment 6 Matthias Becker CLA 2018-02-27 10:05:39 EST
As long as org.eclipse.ui.keys.KeyFormatterFactory is used we must keep the call 

// Initialize the old key formatter settings.
org.eclipse.ui.keys.KeyFormatterFactory.setDefault(org.eclipse.ui.keys.SWTKeySupport.getKeyFormatterForPlatform());

in WorkbenchCommandSupport

So reverted my change https://git.eclipse.org/r/#/c/116536/.

Anyway I opt for keeping https://git.eclipse.org/r/118259 as it removes calls to deprecated classes.
Comment 7 Till Brychcy CLA 2018-02-27 10:14:02 EST
(In reply to Matthias Becker from comment #6)
> 
> Anyway I opt for keeping https://git.eclipse.org/r/118259 as it removes
> calls to deprecated classes.

I agree - with a matching bug title and commit message.
Comment 8 Matthias Becker CLA 2018-02-27 10:31:26 EST
(In reply to Till Brychcy from comment #7)
> I agree - with a matching bug title and commit message.

Done.
Comment 10 Till Brychcy CLA 2018-03-01 01:16:16 EST
(In reply to Eclipse Genie from comment #9)
> Gerrit change https://git.eclipse.org/r/118259 was merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/
> ?id=5cb4e8fd43d5acac813115b77f0a14d9cdb83f2f

Released for 4.8M6