Bug 531817

Summary: Access org.eclipse.ui.browserSupport contributions by ID
Product: [Eclipse Project] Platform Reporter: Alex Boyko <aboyko>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: mistria, mlippert, psuzzi
Version: 4.8Keywords: api
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=531697
Whiteboard:

Description Alex Boyko CLA 2018-02-28 14:26:26 EST
I'd like to chose a specific Browser Support object from the registry to create a browser and open URLs from my eclipse UI component. The browser is really a URL handler for a URL to execute some action in Eclipse.

Currently there is only access from the workbench to the currently active browser support. I'd like my contributed browser support not to be active. I'd rather instead find my browser support by id and then call createBrowser(...) on it without touching the currently active browser support.

Think I'd need id optional attribute of type string for the extension point. If it's supplied then browser support cannot be made active for example and can only be invoked when accessed via it's id (not sure how best to access to via it's id). This is just an example.
Comment 1 Mickael Istria CLA 2018-03-01 02:59:39 EST
I think adding optional "id" attribute in schema and new APIs to access browser without changing the current behavior is a safe change that we can try for Photon.
Maybe in your initial use-case, what you'd like wouldn't be so much of an "id" but more a "supportedProtocols" attribute (and assume empty would mean any protocol with lower priority, while "springboot" would register the browserSupport for "springboot" with higher priority) and then the method "createBrowser(URL)" would give higher priority to your springboot browser when it finds springboot:/ URLs. As this is a new field, it would also be backward compatible. 
@Alex: do you think you can create the patch?
Comment 2 Alex Boyko CLA 2018-03-28 11:36:26 EDT
Yes, I'll look into creating a patch for this :-)