[svn] r6528: vs-plugin/trunk: Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n Nemerle....

IT svnadmin at nemerle.org
Wed Aug 16 06:36:19 CEST 2006


Log:
Short location text for quick tips.

Author: IT
Date: Wed Aug 16 06:36:14 2006
New Revision: 6528

Modified:
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n
   vs-plugin/trunk/Nemerle.VSIP.suo
   vs-plugin/trunk/Nemerle.VsIntegration/Engine/ProjectInfo.cs
   vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/QuickTipInfo.n	Wed Aug 16 06:36:14 2006
@@ -12,7 +12,8 @@
   //[Record]
   public class QuickTipInfo
   {
-    [Accessor] mutable _text      : string;
+    [Accessor(flags = WantSetter)] mutable _text      : string;
+
     [Accessor] mutable _lineStart : int;
     [Accessor] mutable _lineEnd   : int;
     [Accessor] mutable _colStart  : int;

Modified: vs-plugin/trunk/Nemerle.VSIP.suo
==============================================================================
Binary files. No diff available.

Modified: vs-plugin/trunk/Nemerle.VsIntegration/Engine/ProjectInfo.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Engine/ProjectInfo.cs	(original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Engine/ProjectInfo.cs	Wed Aug 16 06:36:14 2006
@@ -17,15 +17,27 @@
 	{
 		private HierarchyListener _listener;
 		private Dictionary<string, int> _filesMap = new Dictionary<string, int>();
-		private static ProjectInfoCollection _projectsInfos =
-			new ProjectInfoCollection();
+		private static ProjectInfoCollection _projectsInfos = new ProjectInfoCollection();
+		private string                       _projectLocation;
 
-		public ProjectInfo(IVsHierarchy hierarchy)
+		public ProjectInfo(IVsHierarchy hierarchy, string fileName, string location)
 		{
 			ErrorHelper.ThrowIsNull(hierarchy, "hierarchy");
 
 			_hierarchy = hierarchy;
 			_engine    = new Engine(new TraceWriter()); // ÷ňîáű ďŕđńĺđ đŕáîňŕë.
+
+			if (location != null)
+			{
+				_projectLocation = location;
+			}
+			else
+			{
+				_projectLocation = Path.GetDirectoryName(fileName);
+			}
+
+			if (_projectLocation.EndsWith("\\") == false)
+				_projectLocation += "\\";
 		}
 
 		IVsHierarchy _hierarchy;
@@ -181,6 +193,9 @@
 		{
 			QuickTipInfo info = Engine.GetProject().GetQuickTipInfo(filePath, line + 1, col + 1, getText);
 
+			if (info != null)
+				info.Text = info.Text.Replace(_projectLocation, "");
+
 			return info;
 		}
 	}

Modified: vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs	(original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/Project/NemerleProjectNode.cs	Wed Aug 16 06:36:14 2006
@@ -90,8 +90,7 @@
 
 		#region fields
 
-		readonly Guid GUID_MruPage =
-			new Guid("{19B97F03-9594-4c1c-BE28-25FF030113B3}");
+		readonly Guid GUID_MruPage = new Guid("{19B97F03-9594-4c1c-BE28-25FF030113B3}");
 
 		VSProject _vsProject = null;
 		IVSMDCodeDomProvider _codeDomProvider;
@@ -210,7 +209,7 @@
 			// IT: ProjectInfo needs to be created before loading
 			// as we will catch assembly reference adding.
 			//
-			_projectInfo = new ProjectInfo(InteropSafeHierarchy);
+			_projectInfo = new ProjectInfo(InteropSafeHierarchy, filename, location);
 
 			ProjectInfo.ProjectsInfos.Add(_projectInfo);
 



More information about the svn mailing list