title: Find an IVsTextView or IWpfTextView for a given ProjectItem, in VS 2010 RC extension
body: <p>I have the ProjectItem, and want to get the IWPFTextView that is associated with it, if any.</p>
  
  <p>I have tried to get an IVsTextManager, and then iterate through the views, but iVsTextManager.EnumViews always returns nothing.</p>
  
  <p>Here is what I've got so far:</p>
  
  <pre><code>var txtMgr = (IVsTextManager)Package.GetGlobalService(typeof(SVsTextManager));
  
  if (txtMgr != null)
  {
      IVsEnumTextViews iVsEnumTextViews;
      IVsTextView[] views = null;
  
      // Passing null will return all available views, at least according to the documentation
      // unfortunately, this returns a 0x80070057 error (invalid parameter)
      var errorValue = txtMgr.EnumViews(null, out iVsEnumTextViews);
  
      if (errorValue == VSConstants.S_OK)
      {
          // enumerate, find the IVsTextView with a matching filename.
  </code></pre>
  
  <p>Surely there is another/better way??</p>
  
  <p>Thanks in advance</p>
  
  <p>~ Cameron</p>