[svn] r7687: vs-plugin/trunk:
Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n
Nemerle.Compi...
VladD2
svnadmin at nemerle.org
Fri May 18 04:11:54 CEST 2007
Log:
1. Rename ResetTypeTree() to ResetNamespaceTree().
2. Sync with compiler (use FullResetNamespaceTree() instate Hierarchy = null). It fix error in initialization.
Author: VladD2
Date: Fri May 18 04:11:49 2007
New Revision: 7687
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/DefineCollection.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-overrides.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Properties.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/SourceCollection.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Tests.n
vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n Fri May 18 04:11:49 2007
@@ -565,7 +565,7 @@
when (isBraceErrorMsg && isBraceMatch()) // Rebuild "type tree".
{
- engine.ResetTypeTree();
+ engine.ResetNamespaceTree();
_project = engine.Project; // new type tree.
errors = _project.GetAllCompilerMessageForFile(_fileIndex).ToArray();
}
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/DefineCollection.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/DefineCollection.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/DefineCollection.n Fri May 18 04:11:49 2007
@@ -36,7 +36,7 @@
{
_defines ::= define;
Engine.Options.DefineConstant (define);
- Engine.ResetTypeTree();
+ Engine.ResetNamespaceTree();
}
}
@@ -46,7 +46,7 @@
{
_ = _defines.Remove(define);
Engine.Options.UndefineConstant(define);
- Engine.ResetTypeTree();
+ Engine.ResetNamespaceTree();
}
}
@@ -62,7 +62,7 @@
foreach (define in _defines)
Engine.Options.UndefineConstant (define);
_defines = [];
- Engine.ResetTypeTree();
+ Engine.ResetNamespaceTree();
}
}
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-main.n Fri May 18 04:11:49 2007
@@ -87,7 +87,7 @@
// next time Init is called, we won't reload libs
Options.PersistentLibraries = true;
#pragma warning disable 618 // Obsolete
- _project = null; // in other locations you must use ResetTypeTree()!
+ _project = null; // in other locations you must use ResetNamespaceTree()!
#pragma warning restore 618 // Obsolete
_namespaces.Clear();
_decls = [];
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-overrides.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-overrides.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine-overrides.n Fri May 18 04:11:49 2007
@@ -44,6 +44,12 @@
}
}
+ protected override FullResetNamespaceTree() : void
+ {
+ base.FullResetNamespaceTree();
+ ResetNamespaceTree();
+ }
+
public override ToString() : string { "Engine: prj=" + _callback.ProjectName }
}
}
\ No newline at end of file
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Init.n Fri May 18 04:11:49 2007
@@ -68,9 +68,8 @@
when (_isCanBeReset)
{
Options.PersistentLibraries = false; // reload libraries on next parse
- ResetTypeTree();
- Hierarchy = null;
+ FullResetNamespaceTree ();
_isCanBeReset = false; // it set tu true in BuildNamespaceTreeAndInitProject()
}
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Properties.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Properties.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Engine/Engine.Properties.n Fri May 18 04:11:49 2007
@@ -103,7 +103,8 @@
}
}
- public ResetTypeTree() : void { _project = null; }
+ public ResetNamespaceTree() : void { _project = null; }
+
public IsProjectAvailable : bool { get { return _project != null; } }
#pragma warning restore 618 // Obsolete
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/SourceCollection.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/SourceCollection.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/SourceCollection.n Fri May 18 04:11:49 2007
@@ -41,7 +41,7 @@
when (!ContainsKey(file))
{
_fileIndices.Add(Location.GetFileIndex(file));
- Engine.ResetTypeTree();
+ Engine.ResetNamespaceTree();
}
_sources[file] = content;
@@ -52,13 +52,13 @@
def ok = _fileIndices.Remove(Location.GetFileIndex(file));
assert(ok);
_sources.Remove(file);
- Engine.ResetTypeTree();
+ Engine.ResetNamespaceTree();
}
public Clear () : void
{
_sources.Clear();
- Engine.ResetTypeTree();
+ Engine.ResetNamespaceTree();
}
public ContainsKey (file : string) : bool { _sources.ContainsKey (file) }
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Tests.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Tests.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Tests.n Fri May 18 04:11:49 2007
@@ -391,10 +391,10 @@
}
Test();
- _engine.ResetTypeTree();
+ _engine.ResetNamespaceTree();
_project = _engine.Project;
Test();
- _engine.ResetTypeTree();
+ _engine.ResetNamespaceTree();
_project = _engine.Project;
Test();
}
Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/ProjectInfo.cs Fri May 18 04:11:49 2007
@@ -345,9 +345,9 @@
get { return Engine.IsProjectAvailable; }
}
- public void ResetTypeTree()
+ public void ResetNamespaceTree()
{
- Engine.ResetTypeTree();
+ Engine.ResetNamespaceTree();
}
public void AddRelocation(
@@ -388,7 +388,7 @@
// Reset link to the project. It leads next request to Project property
// will create new project, and accordingly will create new types tree.
- ResetTypeTree();
+ ResetNamespaceTree();
#if DebugLocations
// Update GUI-tree visualizing AST of the current file.
More information about the svn
mailing list