Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Studio SDK
Reference
Interfaces
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio SDK
IVsQueryEditQuerySave2 Interface

Indicates to the environment or source control package that a file is about to be changed in memory or saved.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

Visual Basic (Declaration)
<InterfaceTypeAttribute(1)> _
<GuidAttribute("53544C4D-5984-11D3-A606-005004775AB1")> _
Public Interface IVsQueryEditQuerySave2
Visual Basic (Usage)
Dim instance As IVsQueryEditQuerySave2
C#
[InterfaceTypeAttribute(1)] 
[GuidAttribute("53544C4D-5984-11D3-A606-005004775AB1")] 
public interface IVsQueryEditQuerySave2
C++
[InterfaceTypeAttribute(1)] 
[GuidAttribute(L"53544C4D-5984-11D3-A606-005004775AB1")] 
public interface class IVsQueryEditQuerySave2
J#
/** @attribute InterfaceTypeAttribute(1) */ 
/** @attribute GuidAttribute("53544C4D-5984-11D3-A606-005004775AB1") */ 
public interface IVsQueryEditQuerySave2
JScript
InterfaceTypeAttribute(1) 
GuidAttribute("53544C4D-5984-11D3-A606-005004775AB1") 
public interface IVsQueryEditQuerySave2

IVsQueryEditQuerySave2 is implemented by Visual Studio and the individual source control packages in the SVsQueryEditQuerySave service, and is called by editor and project packages. This interface allows the environment to ensure that the file is made writable or checked out at the correct time. A project or editor must request permission to transition to the changed (dirty) state by calling QueryEditFiles method. Before an editor saves a file, it must call QuerySaveFile or QuerySaveFiles. For project files, these calls are automatically completed by the solution, which knows when to save a project file. Editors are responsible for making these calls unless the editor implementation of the IVsPersistDocData2 interface uses the helper function SaveDocDataToFile method. If your editor implements the IVsPersistDocData2 interface in this way, then the call to QuerySaveFile or QuerySaveFiles is made for you.

Calls to QuerySaveFiles can be batched using the BeginQuerySaveBatch and EndQuerySaveBatch methods.

The DeclareReloadableFile and DeclareUnreloadableFile methods inform the environment whether the editor is capable of reloading the particular file. These methods are not required if the editor supports IVsPersistDocData or IVsPersistDocData2.

OnAfterSaveUnreloadableFile method is called by the environment for nonreloadable files.

Notes to Implementers This interface is implemented by the source control package. It is recommended that this interface be implemented. The environment always implements this interface and forwards all calls, if possible, to the current source control package. If this interface is not implemented, the user may need to manually check out the files from source control and reload them in the IDE.

Notes to Callers The methods of the IVsQueryEditQuerySave2 interface should be called immediately before a document is edited for the first time, and immediately before a document is saved.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker