Giter VIP home page Giter VIP logo

Comments (1)

gundermanc avatar gundermanc commented on June 24, 2024

I want to highlight the function my assembly implement

Assuming you literally mean highlight them, you can do so by exporting an ITaggerProvider<TextMarkerTag> that creates TextMarkerTags for each of your assembly's methods.

and show a tooltip when mouse hover

Assuming that your assembly is a .NET assembly, you can already provide documentation for your assembly by including an XML documentation file along with your assembly. These docs will be picked up by Roslyn. If you want to add some additional information to the tooltip you can do so by implementing IQuickInfoSourceProvider and returning items for spans of text that contain your assembly's member names.

And search all references of my assembly from solution.

This is a more complex task that really can only be done by the language service. Project structure, references, etc. are exposed to the IDE via numerous end points, but AFAIK you have to integrated with the language service to get that kind of info. I'd recommend looking at the Roslyn SDK to see if you can query the Roslyn LS directly. This code looks related to what you are trying to accomplish. There's probably an API you can consume.

Can i get code references,namespace,classname or other judgment basis from IQuickInfoSource.AugmentQuickInfoSession and ITagger.GetTags?

There are probably hacky ways to get this information from Roslyn quick info data or tags produced by Roslyn or the editor but I'd strongly recommend against this. We frequently changing a lot of the underlying structure of editor features and will probably break any extension that depends on impl. details.

from vssdk-extensibility-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.