Skip to content

Expose ILinkSupport in API #1805

Closed
Closed

Description

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

Activity

  1. added
    feature-request
    on Jan 6, 2016
  2. joaomoreno commented on Jan 6, 2016

    @joaomoreno
    Contributor
  3. alexdima commented on Jan 14, 2016

    @alexdima
    Member

    Johannes Rieken (@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?

  4. jrieken commented on Jan 14, 2016

    @jrieken
    Contributor

    Ignacio Hernandez-Ros (@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?

  5. IgnacioHR commented on Jan 17, 2016

    @IgnacioHR
    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_

  6. jrieken commented on Jan 18, 2016

    @jrieken
    Contributor

    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.

  7. IgnacioHR commented on Jan 19, 2016

    @IgnacioHR
    Author

    Sounds good to me. Thanks

  8. changed the title [-]Add API support to mouse events in editor[/-] [+]Expose ILinkSupport in API[/+] on Jan 20, 2016
  9. jrieken commented on Jul 21, 2016

    @jrieken
    Contributor
    • add registerDocumentLinkProvider API
    • add corresponding command vscode.executeLinkProvider for advanced use-cases
    • update sample
  10. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apifeature-request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions