I'm not quite sure if this is the right place to ask this but Matthias told me on stackoverflow to post it here.
I'm trying to make a ReSharper plugin that has a QuickFix which creates a new class with a specific name and adds it as a child to the body of a given ICSharpNamespaceDeclaration.
So basically I want a quickfix that changes this:
namespace ClassLibraryProject
{
}
Into this:
namespace ClassLibraryProject
{
public class NewClass
{
}
}
I'm new to the ReSharper API/SDK and I'm mainly trying to follow the DevGuide and the sample files from this template but the example shown here only changes the name of the node. I haven't been able to find any information on how to create new ITreeNodes so I hope anyone knows what I can do.
Hi @RoVluche, sorry I must have missed the notification.
I think the relevant part for you is here. You would use the factory to create a proper IClassDeclaration and then use it to set the body of your INamespaceDeclaration element.
I'm not quite sure if this is the right place to ask this but Matthias told me on stackoverflow to post it here. I'm trying to make a ReSharper plugin that has a QuickFix which creates a new class with a specific name and adds it as a child to the body of a given ICSharpNamespaceDeclaration.
So basically I want a quickfix that changes this:
Into this:
I'm new to the ReSharper API/SDK and I'm mainly trying to follow the DevGuide and the sample files from this template but the example shown here only changes the name of the node. I haven't been able to find any information on how to create new ITreeNodes so I hope anyone knows what I can do.