没有合适的资源?快使用搜索试试~ 我知道了~
Visual Studio中实现JavaScript折叠
需积分: 11 9 下载量 92 浏览量
2013-11-11
20:48:43
上传
评论
收藏 2KB TXT 举报
温馨提示
试读
3页
Visual Studio中实现JavaScript折叠
资源推荐
资源详情
资源评论
Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
Imports System.Collections
Public Module JsMacros
Sub OutlineRegions()
Dim selection As EnvDTE.TextSelection = DTE.ActiveDocument.Selection
Const REGION_START As String = "//#region"
Const REGION_END As String = "//#endregion"
selection.SelectAll()
'农民伯伯 — 自动为”//#endregion”结束的代码添加最后一行,不然出 错
If selection.Text.EndsWith(REGION_END) Then
selection.EndOfLine()
selection.NewLine()
selection.SelectAll()
End If
Dim text As String = selection.Text
selection.StartOfDocument(True)
Dim startIndex As Integer
Dim endIndex As Integer
Dim lastIndex As Integer = 0
Dim startRegions As Stack = New Stack()
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
Imports System.Collections
Public Module JsMacros
Sub OutlineRegions()
Dim selection As EnvDTE.TextSelection = DTE.ActiveDocument.Selection
Const REGION_START As String = "//#region"
Const REGION_END As String = "//#endregion"
selection.SelectAll()
'农民伯伯 — 自动为”//#endregion”结束的代码添加最后一行,不然出 错
If selection.Text.EndsWith(REGION_END) Then
selection.EndOfLine()
selection.NewLine()
selection.SelectAll()
End If
Dim text As String = selection.Text
selection.StartOfDocument(True)
Dim startIndex As Integer
Dim endIndex As Integer
Dim lastIndex As Integer = 0
Dim startRegions As Stack = New Stack()
资源评论
heifade
- 粉丝: 1
- 资源: 43
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功