[svn]
r6746: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n
IT
svnadmin at nemerle.org
Tue Oct 3 05:29:41 CEST 2006
Log:
#region/#endregion regions.
Author: IT
Date: Tue Oct 3 05:29:39 2006
New Revision: 6746
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n Tue Oct 3 05:29:39 2006
@@ -369,8 +369,20 @@
| ParsedFile.Parsed(_, _, regions) =>
foreach (r in regions)
- addHiddenRegion(r.Location, r.Text, true);
+ {
+ mutable lineStart = r.Location.Line;
+ mutable colStart = r.Location.Column;
+ mutable lineEnd = r.Location.EndLine;
+ mutable colEnd = r.Location.EndColumn;
+
+ def str = source.GetLine(lineStart);
+ colStart = str.IndexOf('#') + 1;
+
+ addHiddenRegion(
+ Location(fileIndex, lineStart, colStart, lineEnd, colEnd),
+ if (string.IsNullOrEmpty(r.Text)) "#region" else r.Text, true);
+ }
| _ => ()
}
}
More information about the svn
mailing list