Hi In my asp.net project I have got lots of javascript files, is it possible to list the tasks/sections marked as "TODO" in the standard "TASK list". At the moment the task list only shows the TODO sections from .vb files not .js files. rahul
I managed to get it around by using the following macro Imports EnvDTE Imports System.IO Imports System.Diagnostics Public Module modTODO Sub Parse(ByVal filename As String) Dim reader As StreamReader Dim line As String Dim intCnt As Integer = 0 reader = File.OpenText(filename)
'Put in task list Dim tl As TaskList = DTE.Windows.Item(Constants.vsWindowKindTaskList).Object Do line = reader.ReadLine() If line Is Nothing Then Exit Do End If If line.IndexOf("TODO") >= 0 Then tl.TaskItems.Add("TODO", "Javascripts", line, vsTaskPriority.vsTaskPriorityMedium,
, True, filename, intCnt, True, True) End If intCnt += 1 Loop ' close the file reader.Close() End Sub Sub FindAllTODOs() Dim proj As Project Dim objFileItem As ProjectItem For Each proj In DTE.Solution.Projects Dim item As ProjectItem For Each item In proj.ProjectItems
If item.Name.IndexOf("scripts") >= 0 Then Dim subItems = item.ProjectItems For Each objFileItem In subItems If objFileItem.Name.IndexOf(".js") >= 0 Then 'Parse file Parse(objFileItem.FileNames(1)) End If Next End If Next Next End Sub End Module
ragarwa
Member
40 Points
8 Posts
Howto add "TODO" list in a javascript files?
Dec 10, 2003 06:47 AM|LINK
russellc
Member
295 Points
59 Posts
Microsoft
Re: Howto add "TODO" list in a javascript files?
Dec 11, 2003 07:11 PM|LINK
ragarwa
Member
40 Points
8 Posts
Re: Howto add "TODO" list in a javascript files?
Dec 11, 2003 09:59 PM|LINK