[PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2017-07-07 Thread Teodor MICU via Phabricator via cfe-commits
mteodor added a comment. In https://reviews.llvm.org/D12407#314671, @klimek wrote: > I think we'll want somebody to find out whether there are simpler ways to > implement this. **Format on save** was implemented by https://reviews.llvm.org/D29221. What's the new functionality in the

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2016-08-29 Thread Jason Juang via cfe-commits
jasjuang added a comment. @jsmouret Bravo for the improved solution! https://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2016-08-28 Thread Jean-Sebastien Mouret via cfe-commits
jsmouret added a comment. A slightly improved version of @jasjuang code. Restores current selection, and really saves if modified. using EnvDTE; using EnvDTE80; public class E : VisualCommanderExt.IExtension { public void SetSite(EnvDTE80.DTE2 DTE_,

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2016-08-27 Thread Jason Juang via cfe-commits
jasjuang added a comment. Just in case someone is interested. I figured out a hack with VCMD that actually does the job. using EnvDTE; using EnvDTE80; public class E : VisualCommanderExt.IExtension { public void SetSite(EnvDTE80.DTE2 DTE_, Microsoft.VisualStudio.Shell.Package

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-22 Thread Beren Minor via cfe-commits
berenm marked 8 inline comments as done. berenm added a comment. For information, I just tested the current diff under Visual Studio 2010 SP1 and everything looks fine as well. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-22 Thread Beren Minor via cfe-commits
berenm added a comment. Actually, the main issue that I see is the difficulty to build the plugin itself. The project does not build out-of-the-box on VS2013, and I had to change the assembly references by hand. I have a patch to get the required assemblies in a more portable way using nuget

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-21 Thread Daniel Jasper via cfe-commits
djasper added a comment. Ping. What's the state of this? http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-21 Thread Manuel Klimek via cfe-commits
I think we'll want somebody to find out whether there are simpler ways to implement this. On Mon, Dec 21, 2015, 9:16 AM Daniel Jasper wrote: > djasper added a comment. > > Ping. What's the state of this? > > > http://reviews.llvm.org/D12407 > > > >

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-21 Thread Manuel Klimek via cfe-commits
klimek added a comment. I think we'll want somebody to find out whether there are simpler ways to implement this. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-14 Thread Beren Minor via cfe-commits
berenm updated this revision to Diff 42718. berenm added a comment. - Patch rebased on trunk - Small cleanups in the RunningDocumentTable usage - Tested and appears work on VS >= 2012 http://reviews.llvm.org/D12407 Files: tools/clang-format-vs/ClangFormat/ClangFormat.csproj

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-14 Thread Beren Minor via cfe-commits
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

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-11-07 Thread Kim Gräsman via cfe-commits
kimgr added a subscriber: kimgr. kimgr added a comment. Add debugging ideas. Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:86 @@ -69,1 +85,3 @@ +IComponentModel componentModel = GetService(typeof(SComponentModel)) as IComponentModel; +

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-11-06 Thread Beren Minor via cfe-commits
berenm added inline comments. Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:86 @@ -69,1 +85,3 @@ +IComponentModel componentModel = GetService(typeof(SComponentModel)) as IComponentModel; +editorAdaptersFactoryService =

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-11-06 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:86 @@ -69,1 +85,3 @@ +IComponentModel componentModel = GetService(typeof(SComponentModel)) as IComponentModel; +editorAdaptersFactoryService =

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-11-06 Thread Hans Wennborg via cfe-commits
hans added inline comments. Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:86 @@ -69,1 +85,3 @@ +IComponentModel componentModel = GetService(typeof(SComponentModel)) as IComponentModel; +editorAdaptersFactoryService =

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-11-06 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:86 @@ -69,1 +85,3 @@ +IComponentModel componentModel = GetService(typeof(SComponentModel)) as IComponentModel; +editorAdaptersFactoryService =

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-10-13 Thread Manuel Klimek via cfe-commits
klimek added reviewers: aaron.ballman, rnk. klimek added a comment. +aaron for windows specific knowledge +rnk to see whether we can get a reviewer with more MS VS experience (perhaps somebody from MS :) My main concern is that this adds a lot of things that I have no idea whether they are

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-10-13 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. LGTM, but someone who understands VS plugins better should give the final sign-off. Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:309 @@ +308,3 @@ +uint _; +IVsHierarchy __; +string

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-09-29 Thread Beren Minor via cfe-commits
berenm updated this revision to Diff 35946. berenm added a comment. Update the diff with the ProvideAutoLoad attribute. Thanks @MyDeveloperDay for the review and tips! http://reviews.llvm.org/D12407 Files: tools/clang-format-vs/ClangFormat/ClangFormat.csproj

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-09-24 Thread Beren Minor via cfe-commits
berenm added a comment. Well, the format on save setting is disabled by default, do you mean you had to enable it twice? Or you had it enabled without the C++ development tools, and after the installation you had to disable and enable it again? http://reviews.llvm.org/D12407

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-09-24 Thread Paul Hoad via cfe-commits
MyDeveloperDay added a comment. I went back and retested VS2010, VS2013 and VS2015. so in all cases I 1. start Visual studio 2. open a .h file (with incorrect style) - (via the recent file menu) 3. make a minor edit of whitespace 4. hit save file In allcases it does NOT reformat the file Now

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-09-23 Thread Manuel Klimek via cfe-commits
klimek added a comment. It's not falling into oblivion, but it's not going to happen before next week, unless somebody else picks the review up. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-09-23 Thread Beren Minor via cfe-commits
berenm added a comment. Ping? Just to be sure it's not going to fall to oblivion. :) http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-09-23 Thread Paul Hoad via cfe-commits
MyDeveloperDay added a comment. Actually the 2010 failure may be my fault, I only have Visual C# installed for VS2010 and not the C++ compilers, as such it doesn't seem to understand C/C++ as the content type if (!textBuffer.ContentType.IsOfType("C/C++")) is failing because the ContentType is

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-31 Thread Hans Wennborg via cfe-commits
hans added a comment. I also don't know anything about how this plugin works, I just build it :) I'm hoping Manuel can take a look. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-31 Thread Manuel Klimek via cfe-commits
I'll need to try to build / install it. I'll take a couple of days, I'm currently swamped. Hope that's ok. On Mon, Aug 31, 2015 at 6:25 PM Hans Wennborg wrote: > hans added a comment. > > I also don't know anything about how this plugin works, I just build it :) > I'm hoping

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-31 Thread Manuel Klimek via cfe-commits
klimek added a subscriber: klimek. klimek added a comment. I'll need to try to build / install it. I'll take a couple of days, I'm currently swamped. Hope that's ok. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-31 Thread Beren Minor via cfe-commits
berenm added a comment. Sure, no worries. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-08-27 Thread Daniel Jasper via cfe-commits
djasper added a comment. I know nothing of Visual Studio, so I have added better reviewers. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits