"Go To Error/Tag" feature in VS.Net
Brought to you by:
mccarthd
Errors and warnings produced by the C# Compiler that
are displayed in the NAntRunner Console window can be
used to nagivate directly to the location where the
error/warning occured in the source, either by
double-clicking on the line or by right clicking and
selecting "Go To Error/Tag" in the context menu.
However, the "[csc]" that NAnt prefixes each line with
prevents that from happening.
The attached patch represents a change I made to look
for and remove "[csc]", following the same symantecs
used for "[echo]" in RedirOutReader and NAntLogsParsor
classes.
-Clint Morgan
clint -at- clintmorgan -dot- com
Logged In: YES
user_id=1321393
Patch didn't post for some reason. ;-(
Index: release/1.1/NAntRunnerAddIn/NAntLogsParsor.cs
RCS file:
/cvsroot/nantrunner/nantrunner/release/1.1/NAntRunnerAddIn/NAntLogsParsor.cs,v
retrieving revision 1.1
diff -u -r1.1 NAntLogsParsor.cs
--- release/1.1/NAntRunnerAddIn/NAntLogsParsor.cs 2 May 2005
21:07:09 -0000 1.1
+++ release/1.1/NAntRunnerAddIn/NAntLogsParsor.cs 30 Jul
2005 22:11:54 -0000
@@ -32,6 +32,11 @@
return Regex.IsMatch(line,@"^BUILD
((SUCCEEDED)|(FAILED))[\s\w\-\(\),]*$");
}
+ public static bool LineContainsCsc(string line)
+ {
+ return Regex.IsMatch(line,@"\[csc\]");
+ }
+
public static bool LineContainsEcho(string line)
{
return Regex.IsMatch(line,@"\[echo\]");
Index: release/1.1/NAntRunnerAddIn/NAntRunner.cs
===================================================================
RCS file:
/cvsroot/nantrunner/nantrunner/release/1.1/NAntRunnerAddIn/NAntRunner.cs,v
retrieving revision 1.1
diff -u -r1.1 NAntRunner.cs
--- release/1.1/NAntRunnerAddIn/NAntRunner.cs 2 May 2005
21:07:09 -0000 1.1
+++ release/1.1/NAntRunnerAddIn/NAntRunner.cs 30 Jul 2005
22:22:57 -0000
@@ -273,7 +273,14 @@
if (conf.DetailedLogs)
{
- NAntPrinterConsole.Print(Output+"\n");
+ if (NAntLogsParsor.LineContainsCsc(Output))
+ {
+
NAntPrinterConsole.Print(NAntLogsParsor.FilterCommandeLine(Output+"\n","csc"));
+ }
+ else
+ {
+ NAntPrinterConsole.Print(Output+"\n");
+ }
continue;
}
@@ -290,7 +297,8 @@
NAntPrinterConsole.Print(NAntLogsParsor.FilterCommandeLine(Output+"\n","echo"));
NAntPrinterConsole.Enable = enable;
}
- else
+
+ else
NAntPrinterConsole.Print(Output+"\n");
}
process.WaitForExit();