开发者

Tell VS2010 to collapse regions

开发者 https://www.devze.com 2023-04-04 01:29 出处:网络
So I have written a t4 template which generates a ton of code and works well.The only issue is that most of the code never needs to be seen by developers so I have hidden in regions all of the开发者_如

So I have written a t4 template which generates a ton of code and works well. The only issue is that most of the code never needs to be seen by developers so I have hidden in regions all of the开发者_如何学编程 boiler plate code . Is there any way (i'm assuming no) to give VS a hint in a c++ code file to go ahead and collapse the regions.


You could generate the code into a separate file and then #include it where necessary. That way you won't have developers working directly on top of the generated code: they don't see it, and it makes possible future regenerations of that code very easy.


Use #pragma region. It won't do have regions hidden by default but it will allow you to collapse multiple functions at once.

0

精彩评论

暂无评论...
验证码 换一张
取 消