public int OnAfterAddFilesEx(int cProjects, int cFiles, IVsProject[] rgpProjects, int[] rgFirstIndices,
string[] rgpszMkDocuments, VSADDFILEFLAGS[] rgFlags)
{
if (Active)
{
// Start by iterating through all projects calling this function
for (int iProject = 0; iProject < cProjects; iProject++)
{
IVsSccProject2 sccProject = rgpProjects[iProject] as IVsSccProject2;
IVsHierarchy pHier = rgpProjects[iProject] as IVsHierarchy;
// If the project is not controllable, or is not controlled, skip it
if (sccProject == null)
{
continue;
}
// Files in this project are in rgszMkOldNames, rgszMkNewNames arrays starting with iProjectFilesStart index and ending at iNextProjecFilesStart-1
int iProjectFilesStart = rgFirstIndices[iProject];
int iNextProjecFilesStart = cFiles;
if (iProject < cProjects - 1)
{
iNextProjecFilesStart = rgFirstIndices[iProject + 1];
}
// Now that we know which files belong to this project, iterate the project files
for (int iFile = iProjectFilesStart; iFile < iNextProjecFilesStart; iFile++)
{
var fileName = rgpszMkDocuments[iFile];
_fileCache.AddFile(fileName,sccProject);
if (GitSccOptions.Current.AutoAddFiles)
{
var repo = RepositoryManager.Instance.GetTrackerForPath(fileName);
repo.AddFile(fileName);
}
// Refresh the solution explorer glyphs for all projects containing this file
//IList<VSITEMSELECTION> nodes = GetControlledProjectsContainingFile(rgpszMkDocuments[iFile]);
//_sccProvider.RefreshNodesGlyphs(nodes);
}
}
}
return VSConstants.E_NOTIMPL; ;
}