Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 560760

Summary: Link Handlers not working on macOS Catalina
Product: [Eclipse Project] Platform Reporter: Matthias Becker <ma.becker>
Component: UIAssignee: Matthias Becker <ma.becker>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Ed.Merks, marcus.hoepfner, thomas.alexander.ritter
Version: 4.15   
Target Milestone: 4.16 M1   
Hardware: PC   
OS: Mac OS X   
See Also: https://github.com/GoogleChrome/chrome-launcher/issues/146
https://git.eclipse.org/r/158788
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7233500b386f0385f3a1b8393bfba6333d4b28dc
Whiteboard:
Bug Depends on:    
Bug Blocks: 560902    

Description Matthias Becker CLA 2020-03-04 03:57:00 EST
The "Link Handlers" preference page does not show all uri schemes as not registered on macOS Catalina. In addition it takes some time to open the preference page.

The cause seems to be that the output of lsregister did change in macOS catalina.
Comment 1 Matthias Becker CLA 2020-03-04 04:29:08 EST
lsregister output has changed in various places:

1.) The info block for an application no longer starts with the lines:
BundleClass: kLSBundleClassApplication
Container mount state: mounted
bundle	id:            ####

but with 

bundle id:          Eclipse (0x1238)
class:              kLSBundleClassApplication (0x2)
container:          / (0x4)
mount state:        mounted

2.) path value has changed. It seems that there is now a hex string at the end of the line for path: /Users/myUser/Eclipse.app (0x15b0)
See also: https://github.com/GoogleChrome/chrome-launcher/issues/146

The other parts we use to read the uri scheme information seem to be changed mainly the blocks: 

claim	id:            42056
name:          The adt protocol
rank:          Default
roles:         Viewer  
flags:         url-type  
icon:          
bindings:      adt:

no looks like

claim id:           ABAP Development Tools (0x395c)
localizedNames:     "LSDefaultLocalizedValue" = "ABAP Development Tools"
rank:               Default
bundle:             Eclipse (0x1238)
flags:              url-type (0000000000000040)
roles:              Viewer (0000000000000002)
bindings:           adt:

As far as I see we only evaluate the bindings: line
Comment 2 Eclipse Genie CLA 2020-03-04 06:23:42 EST
New Gerrit change created: https://git.eclipse.org/r/158788
Comment 3 Matthias Becker CLA 2020-03-04 06:49:58 EST
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created: https://git.eclipse.org/r/158788

I this change I simply added an shortened version of my lsregister output.
This can be a good starting point for writing a unit test and fixing this issue.
Comment 5 Matthias Becker CLA 2020-04-02 09:24:30 EDT
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/158788 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=7233500b386f0385f3a1b8393bfba6333d4b28dc

Let's test this in tomorrow's i-build.
Comment 6 Matthias Becker CLA 2020-04-03 05:26:04 EDT
validated with eclipse-SDK-I20200402-2250-macosx-cocoa-x86_64.dmg