berenm added inline comments. ================ Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:195 @@ -179,1 +194,3 @@ + runningDocumentTable = new RunningDocumentTable(this); + adviseCookie = runningDocumentTable.Advise(this); ---------------- In this blog post, they go through another interface to modify the file contents.
I wanted to re-use the FormatTextBuffer method, that was operating on an ITextBuffer, and getting this ITextBuffer from a IDontKnowWhatDocument requires to go through this ComponentModel thing. I did some small changes and some new quick testing and I think everything now works on VS2012 and later. I haven't tested the plugin on VS2010 though. ================ Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:441 @@ +440,3 @@ + var documentInfo = runningDocumentTable.GetDocumentInfo(docCookie); + if (documentInfo.DocData == null) + return VSConstants.S_OK; ---------------- Sorry I dropped this part :'( http://reviews.llvm.org/D12407 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits