-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Include XML doc comments when implementing an interface with Shift+Alt+F10 #7862
Comments
Do we really want to always do this? Maybe just under an option? |
Can we instead show the first discovered inherited doc comments in QuickInfo/IntelliSense? For example, quick info on /// <summary>B1 says Hello, World</summary>
interface B1
{
}
/// <summary>Hello from B2!</summary>
interface B2 : B1
{
}
class D : B2
{
} might look something like:
/cc: @CyrusNajmabadi |
Can we re-triage this to decide whether duplicating the comments is really what we want, instead of the above suggestion or support for |
We agree that duplicating isn't what we want. We think the ideal solution here is for the compiler to support |
Hi, I have made some tests and think it could be implemented like this.
Alternative approaches:
Happy for feedback |
Yes, it's still up for grabs, and we'd love it if you are interested in taking it on. @DustinCampbell, @dpoeschl, and I had a quick chat about how we think it might work this morning. I'm going to assign the issue to @dpoeschl to work with you on the design. It's too late to include this in VS 2015 Update 2, but if things come together, we'd love to include it in the next VS Update after that! |
I personally don't think we need something like "inheritdoc". |
@CyrusNajmabadi We discussed the tooling ecosystem that makes a Roslyn implementation of |
@dpoeschl Yup. That sounds good. |
Great, so what’s the next step? Did your quick chat about how it might work differ a lot from my suggestion? Otherwise I could continue to work from my tests. I guess there will be a lot of details to discuss. |
@dpoeschl I have expanded my tests and have implemented the most common cases. I have some thoughts that would be good to get some feedback on.
|
@dpoeschl What's the status of this? |
I think it would be good to treat this as blocked on dotnet/csharplang#313. |
https://developercommunity.visualstudio.com/content/idea/412325/.html was marked a duplicate of this. |
Closing this issue as complete. Starting in Visual Studio 2019 Update 16.4 methods that have no XML documentation can now automatically inherit XML documentation from the method it is overriding. Place your cursor over the undocumented method that implements a documented interface method. Quick Info will then display the XML documentation from the interface method. Release notes |
@kendrahavens you added a link to the release notes, but purely from reading them I wouldn't know that this issue was solved. Is there another "full" list of changes in a release? |
@TobiasKnauss Apologies for the delay. I should have mentioned in the comment and in the release notes that this does apply to classes and interfaces as well as overridden methods. You can find a sample on an interface using inheritdoc in our docs: https://docs.microsoft.com/en-us/dotnet/csharp/codedoc#inheritdoc Is that what you were looking for? |
Yes, but I already found that. I just wanted to know whether the notification about |
No, there were not other detailed release notes other than the overridden methods mentioned and the doc updates. I can update the release notes to include the inheritdoc tag example. |
The release notes have been archived meanwhile. |
[Filed on behalf of a customer]
Most of the the time the comments apply to the class implementing the interface, so it makes sense to just copy the comments over.
VS Feedback 456983
The text was updated successfully, but these errors were encountered: