[svn] r7602: vs-plugin/trunk:
Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/GotoInfo.n
Nemerle.VsIn...
phantom
svnadmin at nemerle.org
Fri Apr 20 02:12:01 CEST 2007
Log:
In GotoUsageForm loc's for unopened files are shown.
Author: phantom
Date: Fri Apr 20 02:11:59 2007
New Revision: 7602
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/GotoInfo.n
vs-plugin/trunk/Nemerle.VsIntegration/GUI/GotoUsageForm.cs
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/GotoInfo.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/GotoInfo.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/GotoInfo.n Fri Apr 20 02:11:59 2007
@@ -39,6 +39,11 @@
}
}
+ public GetLineOfCode(project: Project) : string
+ {
+ project.Engine.ProjectSources.GetSource(FileIndex).GetLine(Line)
+ }
+
public UsageTypeToString() : string
{
match (_usageType)
Modified: vs-plugin/trunk/Nemerle.VsIntegration/GUI/GotoUsageForm.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/GUI/GotoUsageForm.cs (original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/GUI/GotoUsageForm.cs Fri Apr 20 02:11:59 2007
@@ -21,19 +21,12 @@
foreach (GotoInfo gotoInfo in gotoInfos)
{
ProjectInfo project = ProjectInfo.FindProject(gotoInfo.FilePath);
- string loc = "";
- if (project != null)
- {
- NemerleSource source = project.GetSource(gotoInfo.FilePath);
- if (source != null)
- loc = source.GetLine(gotoInfo.Line - 1);
- }
ListViewItem lvi = new ListViewItem(new string[]
{
Path.GetFileName(gotoInfo.FilePath),
gotoInfo.Line.ToString(),
gotoInfo.UsageTypeToString(),
- loc.Replace("\t", " ")
+ gotoInfo.GetLineOfCode(project.Project).Replace("\t", " ")
});
lvi.ToolTipText = gotoInfo.FilePath;
lvi.Tag = gotoInfo;
More information about the svn
mailing list