The following model represents the source control implementation from the Figures Project, part of the Figures sample. In the model, you see the interfaces that you must implement and the environment services that you must call. Like all services, you actually call the methods of a particular interface that you obtain by way of the service. The names of the classes are specific to the Figures sample but are identified to make it easier to see how source control is carried out. For more information about the Figures Sample, refer to the Environment SDK documentation.
Example from Figures sample
.gif)
Interfaces
You can implement source control for your new project types in Visual Studio using the list of interfaces shown in the following table.
Interface |
Use |
|---|---|
|
For information on how to call the methods of the interface, see class CFileViewProjNode in Figures Sample. |
Called by projects and editors before they save or change (dirty) files. This interface is accessed using the SVsQueryEditQuerySave service. |
|
For information on how to call the methods of the interface, see class CVsTrackProjectDocuments2Helper in Figures Sample. |
Called by projects to request permission to add, remove, or rename a file or directory. This interface is also called by projects to inform the environment when an approved add, remove, or rename action is complete. It is accessed using the SVsTrackProjectDocuments service. |
IVsTrackProjectDocumentsEvents2 This is not implemented in a sample. |
Implemented by any entity that registers to be notified when projects add, rename, or remove a file or directory. To register for event notification, call AdviseTrackProjectDocumentsEvents. |
|
For information on how to call the methods of the interface, see class CVsMyProjectHierarchy in Figures Sample. |
Called by projects to register with the source control package and to obtain information on source control status. This interface is accessed using the SVsSccManager service. |
|
For information on how to implement the interface, see class CVsMyProjectHierarchy in Figures Sample. |
Implemented by the project to respond to source control requests for information about files and to obtain the source control settings required for the project file. |