public virtual int OnQueryRemoveDirectories(IVsProject pProject, int cDirectories, string[] rgpszMkDocuments, VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags, VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult, VSQUERYREMOVEDIRECTORYRESULTS[] rgResults)
 {
     return VSConstants.E_NOTIMPL;
 }
 int IVsTrackProjectDocumentsEvents2.OnQueryRemoveDirectories(
     IVsProject pProject,
     int cDirectories,
     string[] rgpszMkDocuments,
     VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags,
     VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult,
     VSQUERYREMOVEDIRECTORYRESULTS[] rgResults)
 {
     return VSConstants.S_OK;
 }
Пример #3
0
 public int OnQueryRemoveDirectories(IVsProject pProject, int cDirectories, string[] rgpszMkDocuments, 
                                     VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags, 
                                     VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult,
                                     VSQUERYREMOVEDIRECTORYRESULTS[] rgResults)
 {
     return 0;
 }
Пример #4
0
 public int OnQueryRemoveDirectories(IVsProject pProject, int cDirectories, string[] rgpszMkDocuments, VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags, VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult, VSQUERYREMOVEDIRECTORYRESULTS[] rgResults) {
     throw new NotImplementedException();
 }
Пример #5
0
 int IVsTrackProjectDocumentsEvents2.OnQueryRemoveDirectories(IVsProject pProject, int cDirectories, string[] rgpszMkDocuments, VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags, VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult, VSQUERYREMOVEDIRECTORYRESULTS[] rgResults)
 {
     return NativeMethods.S_OK; // We are not interested in this one
 }
 public int OnQueryRemoveDirectories(IVsProject pProject, int cDirectories, string[] rgpszMkDocuments, VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags, VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult, VSQUERYREMOVEDIRECTORYRESULTS[] rgResults) {
     foreach (var dir in rgpszMkDocuments) {
         DocumentEvents.Add("OnQueryRemoveDirectories " + dir);
         CodeDocumentEvents.Add("OnQueryRemoveDirectories(" + GetRelativePath(pProject, dir) + ")");
     }
     return VSConstants.S_OK;
 }
Пример #7
0
        public int OnQueryRemoveDirectories(IVsProject pProject, int cDirectories, string[] rgpszMkDocuments, VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags, VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult, VSQUERYREMOVEDIRECTORYRESULTS[] rgResults)
        {
            if (rgpszMkDocuments == null)
                return VSConstants.E_POINTER;

            bool allOk = true;

            IVsSccProject2 sccProject = pProject as IVsSccProject2;

            for (int i = 0; i < cDirectories; i++)
            {
                bool ok = true;

                string dir = rgpszMkDocuments[i];

                if (string.IsNullOrEmpty(dir) || !GitItem.IsValidPath(dir))
                    continue;

                dir = GitTools.GetNormalizedFullPath(dir);

                if (SccProvider.TrackProjectChanges(sccProject))
                    SccProvider.OnBeforeRemoveDirectory(sccProject, dir, out ok);

                if (rgResults != null)
                {
                    rgResults[i] = ok ? VSQUERYREMOVEDIRECTORYRESULTS.VSQUERYREMOVEDIRECTORYRESULTS_RemoveOK : VSQUERYREMOVEDIRECTORYRESULTS.VSQUERYREMOVEDIRECTORYRESULTS_RemoveNotOK;
                }

                if (!ok)
                    allOk = false;
            }

            if (pSummaryResult != null)
                pSummaryResult[0] = allOk ? VSQUERYREMOVEDIRECTORYRESULTS.VSQUERYREMOVEDIRECTORYRESULTS_RemoveOK : VSQUERYREMOVEDIRECTORYRESULTS.VSQUERYREMOVEDIRECTORYRESULTS_RemoveNotOK;

            return VSConstants.S_OK;
        }