Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ILinkSupport in API #1805

Closed
IgnacioHR opened this issue Jan 6, 2016 · 7 comments
Closed

Expose ILinkSupport in API #1805

IgnacioHR opened this issue Jan 6, 2016 · 7 comments
Assignees
Labels
api feature-request Request for new features or functionality
Milestone

Comments

@IgnacioHR
Copy link

Hi, I've started to write an extension to provide support for W3C XLink Specification to the xml language the xlink specification provides attributes to document links from an XML fragment o another XML fragment.

At the time I find an xlink:href attribute on an XML node I'm able to create a customized decoration on the attribute value but I'm unable to find the way to properly implement a mechanism to detect when the user has clicked on the decoration. I've actually implemented a DefinitionProvider that is able to open the document but the user must press F12 or right click on the text and select "Go to Definition" but a link is not a Definition but just the link end point.

Cheers,
Ignacio

@joaomoreno joaomoreno added the feature-request Request for new features or functionality label Jan 6, 2016
@joaomoreno
Copy link
Member

@alexandrudima ping

@alexdima
Copy link
Member

@jrieken How do you think we should better handle this?

Should we expose ILinkSupport in the api and accumulate & dedup the links from all parties? Or should DefinitionProvider be expanded in scope to capture any link?

@alexdima alexdima added the api label Jan 14, 2016
@jrieken
Copy link
Member

jrieken commented Jan 14, 2016

@IgnacioHR Are the documents those links point to usually inside the workspace or something like a http-url that you want to be opened in a browser?

@IgnacioHR
Copy link
Author

Links points anywhere. They are just links. The URI is resolved using xml:base standard resolution and the target file might be local or external. When local, I open it on a side editor and I find the target element so it is highlighted.
_extension_development_host__-_202-01-hrefresolution_xsd_y_extension_ts_-_miextension_y_add_api_support_to_mouse_events_in_editor_ _issue__1805_ _microsoft_vscode_y_entrada_ _ignacio_reportingstandard_com__2959_mensajes_

@jrieken
Copy link
Member

jrieken commented Jan 18, 2016

Thanks. I think the best will be expose the ILinkSupport in some form. VS Code (as today) will come with a decent default implementation but for special cases (like above) you can mark for regions of a document as hyperlink.

@jrieken jrieken self-assigned this Jan 18, 2016
@IgnacioHR
Copy link
Author

Sounds good to me. Thanks

@jrieken jrieken changed the title Add API support to mouse events in editor Expose ILinkSupport in API Jan 20, 2016
@jrieken jrieken added this to the June 2016 milestone May 27, 2016
@jrieken jrieken modified the milestones: June 2016, July 2016 Jun 25, 2016
@jrieken
Copy link
Member

jrieken commented Jul 21, 2016

  • add registerDocumentLinkProvider API
  • add corresponding command vscode.executeLinkProvider for advanced use-cases
  • update sample

@egamma egamma mentioned this issue Jul 21, 2016
89 tasks
@jrieken jrieken closed this as completed Jul 25, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants