ITreeNode.GetContainingFile() is returning null after last SDK update
After upgrading to the latest SDK (JetBrains.ReSharper.SDK version=2017.1.20170407.131329), ITreeNode.GetContainingFile() as well as .GetDocumentRange() is returning null. This didn't use to happen. Is this a bug or is there another way to get "DocumentRange" for a ITreeNode?
Please sign in to leave a comment.
Please, provide test case where such situation happens.
So this is the code that the plugin runs against:
namespace TestClassLibrary.Business
{
public enum AddressType
{
Home = 0,
Work = 1,
Other = 2
}
}
It is in a file called "AddressType.cs"
When the cursor selects the enum name "AddressType"...
The plugin code runs:
Snippet
document is resulting in null since the last SDK update, because internally it is calling:
enumDeclaration.GetContainingFile()
which also is returning null now (but didn't used to).
John, what is _provider? Better, to provide full sources of plugin so I can check without guessing.