locked
How do you open a document in a tool window? RRS feed

  • Question

  • We have a document type that is being edited in a tool window, but it should still be possible to open it using File->Open. Is it possible to avoid creating an editor document view when opening a document, but still include the document in the running documents table (under the Miscellaneous hierarchy)? I want it to be  included in the "Do you want to save" prompt when closing the solution, and it would be nice to be able to save it using File->Save as well.

    The wanted behaviour is quite similar to the behaviour of the Performance session documents shown in the Performance explorer window.

    I have been playing around with this quite a bit, but I still have not found a solution. Does anybody have an idea how to do this?

    Best regards,

    Andreas

    Thursday, November 9, 2006 9:32 PM

Answers

  • Hi Andreas,

    The mechanism that VS uses for this is the IVsRunningDocumentTable interface. Have you tried calling the RegisterAndLockDocument() method on this interface to register with the RDT when your toolwindow opens the document?

    Thanks,

    Aaron Marten

    Wednesday, November 22, 2006 9:13 PM