Hello,
I have the following problem: I wrote a managed package which adds a new
ToolWindow to VS. Inside the toolwindow, I can connect to different servers
(just like adding servers in ServerExplorer).
I'd like to get the chance of persisting somehow the list of connected
servers so I can load it the next time my window is created. I assumed this
can be achieved inside IVsWindowPane.SaveViewState, but unfortunatelly VS
does not call this method on my window.
Is there something I need to do in order to be called on this method or
there is another way this can be done?
Thanks a lot,
Ciprian Jichici
Genisoft
"Ed Dore [MSFT]" - 02 Aug 2004 23:17 GMT
Hi Ciprian,
In reviewing the code, I could only locate an invocation of this function
that occurs when persisting data to a project's SUO file. The function in
question retrieves the frame window's docview data pointer from the
VSFPROPID_DocView property (which doesn't appear to be a valid property for
toolwindows). Then QI's for IVsWindowPane and calls SaveViewPane. I'm not
certain if this particular function get's called outsidewhere you actually
have an solution loaded yet.
You could try loading/saving your custom data in the IVsWindowPane's
CreatePaneWindow and CloasePane methods though.
Sincerely,
Ed Dore [MSFT]
This post is 'AS IS' with no warranties, and confers no rights.
"Ed Dore [MSFT]" - 09 Aug 2004 22:25 GMT
Hi Ciprian,
I did get confirmation on this from the dev team.
IVsWindowPane::SaveViewPane only gets called for document windows. For
toolwindows, VS only persists the layout information. You'll need to handle
this manually with CreatePaneWindow and ClosePane on your IVsWindowPane
implementation.
Sincerely,
Ed Dore [MSFT]
This post is 'AS IS' with no warranties and confers no rights.