I have the ProjectItem, and want to get the IWPFTextView that is associated with it, if any.
I have tried to get an IVsTextManager, and then iterate through the view
You can get IWpfTextView like that:
var componentModel = (IComponentModel)GetService(typeof(SComponentModel));
var textManager = (IVsTextManager)Package.GetGlobalService(typeof(SVsTextManager));
IVsTextView activeView = null;
ErrorHandler.ThrowOnFailure(textManager.GetActiveView(1, null, out activeView));
var editorAdapter = componentModel.GetService();
IWpfTextView wpfTextView = editorAdapetr.GetWpfTextView(activeView);