开发者

Tell VS2010 to collapse regions

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜