Bug 531817 - Access org.eclipse.ui.browserSupport contributions by ID
Summary: Access org.eclipse.ui.browserSupport contributions by ID
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2018-02-28 14:26 EST by Alex Boyko CLA
Modified: 2018-03-28 11:36 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 :-)