[svn] r7552: vs-plugin/trunk:
Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n
N...
phantom
svnadmin at nemerle.org
Tue Mar 27 20:15:07 CEST 2007
Log:
Refactoring for feature request on highlights.
Author: phantom
Date: Tue Mar 27 20:15:05 2007
New Revision: 7552
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n
vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleSource.cs
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Refactoring.n Tue Mar 27 20:15:05 2007
@@ -61,7 +61,7 @@
| _ => (goto.Location, 1)
}
});
- lexer.SetHighlights(highlights);
+ lexer.SetHoverHighlights(highlights);
| _ => ()
}
}
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n Tue Mar 27 20:15:05 2007
@@ -761,6 +761,7 @@
_ = checkForHighlights(_tokenInfo);
_tokenInfo //VladD2: 2IT: Блин, приколист. Я час ошибку искал. Все элементы в массиве одинковые. :(
+ //phantom: 2VladD2: они просто маленькие... когда они вырастут, станут различаться. :)
}
checkForHighlights(tokenInfo : ScanTokenInfo) : bool
@@ -779,7 +780,7 @@
location.EndColumn >= tokenLocation.EndColumn
}
def highlightColor =
- match (_highlightedLocations.Get(line))
+ match (hoverHighlightedLocations.Get(line))
{
| Some(highlights) =>
match (highlights.Find(isInside))
@@ -798,17 +799,17 @@
highlighted
}
- mutable _highlightedLocations : Hashtable[int, list[Location * int]] = Hashtable();
+ mutable hoverHighlightedLocations : Hashtable[int, list[Location * int]] = Hashtable();
AddHighlightsOnTheLine(lineNumber : int, highlights : list[Location * int]) : void
{
- _highlightedLocations[lineNumber] = highlights;
+ hoverHighlightedLocations[lineNumber] = highlights;
}
- public SetHighlights(highlights : list[Location * int]) : void
+ public SetHoverHighlights(highlights : list[Location * int]) : void
{
// phantom: if uncomment the next line, highlighting will be incremental (accumulative)
- _ = ClearHighlights();
+ _ = ClearHoverHighlights();
// TODO: ask why i cannot use the commented form
//def _ = highlights.Group((one, two) => one[0].Line - two[1].Line);
def groups = highlights.Group((one : Location * int, two : Location * int) =>
@@ -828,10 +829,10 @@
}
}
- public ClearHighlights() : bool
+ public ClearHoverHighlights() : bool
{
- def cleared = _highlightedLocations.Count > 0;
- _highlightedLocations.Clear();
+ def cleared = hoverHighlightedLocations.Count > 0;
+ hoverHighlightedLocations.Clear();
cleared
}
Modified: vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleSource.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleSource.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleSource.cs Tue Mar 27 20:15:05 2007
@@ -125,7 +125,7 @@
changes.iStartLine + 1);
}
- if (_scanner.GetLexer().ClearHighlights())
+ if (_scanner.GetLexer().ClearHoverHighlights())
{
int lineCount;
GetTextLines().GetLineCount(out lineCount);
More information about the svn
mailing list