SSMS 2008 中的#region 功能
使用Sql Server 2008,Visual Studio中有类似#region的功能吗?
我知道节点似乎允许折叠 SQL 段,但据我所知,这是基于 SQL 语句的语法。
虽然这接近我想要的,但我想知道是否有一种方法可以定义一段代码,无论语法如何,类似于#region/#endregion。
有什么想法吗?
Using Sql Server 2008, is there any functionality similar to #region in Visual Studio?
I'm aware that nodes appear to allow collapsing of SQL segments, but as far as I know, this is based on the syntax of the SQL statement.
While that is close to what I'm after, I'm wondering if there is a way to define a section of code, regardless of syntax, similar to #region/#endregion.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
是的,SSMS 2008 中有本机支持,无需任何插件。
区域定义如下:
请参阅此处的示例:
http://blog. sqlauthority.com/2009/06/28/sql-server-2008-management-studio-new-features-2/
Yes, there is native support in SSMS 2008 on, without any addins.
The regions are defined by:
See examples here:
http://blog.sqlauthority.com/2009/06/28/sql-server-2008-management-studio-new-features-2/
SSMS 有一个名为 SSMS 工具包 的插件。
它允许您使用 #region / #endregion http://www.ssmstoolspack.com/Features?f= 9
There is an add-in for SSMS called SSMS Tools Pack.
It lets you use #region / #endregion http://www.ssmstoolspack.com/Features?f=9
我为 SSMS 开发了 SSMSBoost 插件 (www.ssmsboost.com),并
在最新版本 (2.12) 中添加了语法支持。还有一个选项可以自动解析打开的文件,以便立即显示区域。
I develop SSMSBoost add-in (www.ssmsboost.com) for SSMS and have added
syntax support in last version (2.12). There is also an option to auto-parse opened files, so that regions will be displayed immediately.
我刚刚破解了
begin
、end
来创建区域,如下所示:我总是确保将
--region
放在 < code>begin 和end
因此它们从真正的begin
和end
块中脱颖而出。例如:I have just been hacking the
begin
,end
to create regions as shown below:I always make sure to put the
--region
beside thebegin
andend
so they stand out from realbegin
andend
blocks. For example:不,没有。它仅在语句级别完成。
No there's not. It only is done at the statement level.