<div dir="ltr">That is one idea that I considered, but from what I understand of how to implement options UI in Visual Studio (I have never actually done this, but looked at it for an hour or so once upon a time) the options and values need to be statically defined in order to create the UI property sheet.  ie you can't build one of these sheets dynamically, because the UI is generated when Visual Studio loads your extension by reading some XML.  It's possible my understanding is wrong though.<div><br></div><div>I agree that per-project and per-file settings would be nice.  I'll have to think about this some more though, as you would want a tight integration with what people normally expect with the project system, such as being able to override settings on a per file basis.  This also means figuring out how to make this interoperate (if at all) with existing .clang-format settings files on disk.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 16, 2016 at 12:41 PM Yury Mikhaylov <<a href="mailto:yury.mikhaylov@gmail.com">yury.mikhaylov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can't we just ask clang-format to dump all options that its parser understands and use that info to populate property sheet in MSVC? Something similar to what -dump-config does now.<div><br></div><div>I have also noticed that your mock-up shows the prop sheet in the system-wide settings. Won't it be better to keep them on per-project basis? Maybe even parse/regenerate .clang-format file in the project folder to allow versioning?</div></div><div dir="ltr"><div><br></div><div>- Yury</div></div><div class="gmail_extra"><div class="gmail_quote">On Fri, Aug 12, 2016 at 3:58 PM, Zachary Turner via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I was thinking about some ways to improve clang-format, and possibly even add clang-tidy to the list of things our VS plugin supports.  Perhaps even merge them into a single plugin.  But you know, I'm a windows person, and I want a UI.  I don't want to just click a button and have it use some settings that are on disk that I edited by hand, I'd like to be able to edit the settings themselves through a nice UI, like everything in VS.</div><div><br></div><div>This is kind of difficult if the plugin shells out to an external tool without linking against it, because it doesn't have any knowledge of what specific options and features the version it's calling might support in order to build the appropriate UI to set them.  On the other hand, if it links against the tool, this all becomes very easy, because the plugin can share types and data structures with the tool itself.  And it also means that someone could download the plugin without installing LLVM, as a standalone tool, greatly reducing the barrier to entry for people wanting to try out the tool.</div><div><br></div><div>Here's a quick mockup of what my ideal UI would look like and what I have in mind: <a href="http://imgur.com/a/p3XBv" target="_blank">http://imgur.com/a/p3XBv</a></div><div><br></div><div>But again, it's hard to maintain this kind of thing if the VS plugin has to rely on an external tool to do the formatting, since it would have to know about every possible set of options for every version as the software improves.  So in order to do this this way, we'd need to probably build clang-format and/or clang-tidy as a DLL and bundle them with the plugin, which could link against it.</div><div><br></div><div>Not really asking anyone else to do the work so much as I am asking if people think this would be cool and/or something they'd like to see.  Personally I think it would be a great way to get clang-format and clang-tidy onto more peoples' systems, particularly those people who are not currently using clang on Windows, since this would be standalone and work out of the box while providing a familiar user interface to what people are used to.</div><div><br></div><div>Thoughts?</div></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div></div></blockquote></div>