[svn] r6733: vs-plugin/trunk:
Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n
Nemerle.VsInt...
IT
svnadmin at nemerle.org
Thu Sep 28 04:27:11 CEST 2006
Log:
Regions for inner classes.
Author: IT
Date: Thu Sep 28 04:27:07 2006
New Revision: 6733
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n
vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleLanguageService.cs
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 Thu Sep 28 04:27:07 2006
@@ -154,6 +154,11 @@
}
}
+ private _Debug[T](obj : T) : void
+ {
+ _ = obj.ToString();
+ }
+
public Check(
/*[NotNull]*/ fileName : string,
/*[NotNull]*/ source : ISourceTextManager,
@@ -173,15 +178,28 @@
col > 0 && str.Length >= col && str[col - 1] == ch
}
- def processDecl(decl)
+ def processBuilder(builder)
{
- | Decl.Type(builder) as tp /*when decl.FileIndex == fileIndex*/ =>
+ // Region for the type itself.
+ //
+ mutable lineStart = builder.Location.Line;
+ mutable colStart = builder.Location.Column;
+ mutable lineEnd = builder.Location.EndLine;
+ mutable colEnd = builder.Location.EndColumn;
+ // Should be temporary solution until we get location for the type name.
+ //
+ colStart = source.GetLine(lineStart).Length + 1;
+
+ addHiddenRegion(Location(fileIndex, lineStart, colStart, lineEnd, colEnd), true);
+
+ // Get regions and errors for methods.
+ //
def _start = Environment.TickCount;
foreach (member in builder.GetDirectMembers())
{
- // TypeBuilder can contains methods from many parts of pertiol
+ // TypeBuilder can contains methods from many parts of partial
// class and super classes. We must process only memebers defined
// in processed file only!
| method is MethodBuilder when method.Location.FileIndex == fileIndex =>
@@ -203,7 +221,7 @@
}
#endif
- // Get region location.
+ // Get the method region location.
//
def loc = method.Location.TrimStart(method.fun_header.Location, false);
@@ -217,21 +235,19 @@
true);
}
+ | builder is TypeBuilder when builder.Location.FileIndex == fileIndex =>
+
+ processBuilder(builder)
+
| _ => ()
}
+ }
- // Region for the type itself.
- //
- mutable lineStart = tp.Location.Line;
- mutable colStart = tp.Location.Column;
- mutable lineEnd = tp.Location.EndLine;
- mutable colEnd = tp.Location.EndColumn;
-
- // Should be temporary solution until we get location for the type name.
- //
- colStart = source.GetLine(lineStart).Length + 1;
+ def processDecl(decl)
+ {
+ | Decl.Type(builder) when builder.Location.FileIndex == fileIndex =>
- addHiddenRegion(Location(fileIndex, lineStart, colStart, lineEnd, colEnd), true);
+ processBuilder(builder)
| Namespace(decls, _, locations, _, _, nsloc) =>
Modified: vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleLanguageService.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleLanguageService.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleLanguageService.cs Thu Sep 28 04:27:07 2006
@@ -200,6 +200,8 @@
try
{
+ request.Sink.ProcessHiddenRegions = true;
+
projectInfo.Engine.ProcessMessages = true;
projectInfo.UpdateFile(request);
@@ -218,7 +220,6 @@
r.dwClient = 25;
request.Sink.AddHiddenRegion(r);
- request.Sink.ProcessHiddenRegions = true;
},
delegate(CompilerMessage cm)
{
More information about the svn
mailing list