[Monodevelop-patches-list] r1630 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion Gui InsightWindow

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue May 25 15:11:37 EDT 2004


Author: lluis
Date: 2004-05-25 15:11:36 -0400 (Tue, 25 May 2004)
New Revision: 1630

Modified:
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CommentCompletionDataProvider.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ICompletionDataProvider.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/TemplateCompletionDataProvider.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/IInsightDataProvider.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/IndexerInsightDataProvider.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/MethodInsightDataProvider.cs
Log:
	* Gui/SourceEditorBuffer.cs: Close the files used to read the text.
	
	* Gui/SourceEditorView.cs: Provide the project of the current file when
	  creating the code completion window.
	  
	* CodeCompletion/CodeCompletionData.cs: Removed ClassProxy stuff.
	
	* CodeCompletion/CompletionWindow.cs: Added project parameter to ctor.
	
	* CodeCompletion/ICompletionDataProvider.cs,
	  CodeCompletion/CommentCompletionDataProvider.cs,
	  CodeCompletion/TemplateCompletionDataProvider.cs,
	  CodeCompletion/CodeCompletionDataProvider.cs: Added project parameter
	  to GenerateCompletionData().
	  
	* InsightWindow/MethodInsightDataProvider.cs
	  InsightWindow/InsightWindow.cs: Added project parameter to constructor.
	  
	* InsightWindow/IInsightDataProvider.cs,
	  InsightWindow/IndexerInsightDataProvider.cs: Added project parameter to
	  SetupDataProvider.



Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2004-05-25 19:11:36 UTC (rev 1630)
@@ -1,3 +1,27 @@
+2004-05-24  Lluis Sanchez Gual  <lluis at ximian.com>
+
+	* Gui/SourceEditorBuffer.cs: Close the files used to read the text.
+	
+	* Gui/SourceEditorView.cs: Provide the project of the current file when
+	  creating the code completion window.
+	  
+	* CodeCompletion/CodeCompletionData.cs: Removed ClassProxy stuff.
+	
+	* CodeCompletion/CompletionWindow.cs: Added project parameter to ctor.
+	
+	* CodeCompletion/ICompletionDataProvider.cs,
+	  CodeCompletion/CommentCompletionDataProvider.cs,
+	  CodeCompletion/TemplateCompletionDataProvider.cs,
+	  CodeCompletion/CodeCompletionDataProvider.cs: Added project parameter
+	  to GenerateCompletionData().
+	  
+	* InsightWindow/MethodInsightDataProvider.cs
+	  InsightWindow/InsightWindow.cs: Added project parameter to constructor.
+	  
+	* InsightWindow/IInsightDataProvider.cs,
+	  InsightWindow/IndexerInsightDataProvider.cs: Added project parameter to
+	  SetupDataProvider.
+
 2004-05-22  Todd Berman  <tberman at sevenl.net>
 
 	* Gui/SourceEditorView.cs: applied patch by Gustav Munkby <grrdev AT

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionData.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -85,17 +85,6 @@
 		public string Description
 		{
 			get {
-				// get correct delegate description (when description is requested)
-				// in the classproxies aren't methods saved, therefore delegate methods
-				// must be get through the real class instead out of the proxy
-				//
-				// Mike
-				if (c is ClassProxy && c.ClassType == ClassType.Delegate) {
-					description = ambienceService.CurrentAmbience.Convert(parserService.GetClass(c.FullyQualifiedName));
-					pango_description = PangoAmbience.Convert(parserService.GetClass(c.FullyQualifiedName));
-					c = null;
-				}
-				
 				// don't give a description string, if no documentation or description is provided
 				if (description.Length + documentation.Length == 0) {
 					return null;
@@ -124,17 +113,6 @@
 		public string DescriptionPango
 		{
 			get {
-				// get correct delegate description (when description is requested)
-				// in the classproxies aren't methods saved, therefore delegate methods
-				// must be get through the real class instead out of the proxy
-				//
-				// Mike
-				if (c is ClassProxy && c.ClassType == ClassType.Delegate) {
-					description = ambienceService.CurrentAmbience.Convert(parserService.GetClass(c.FullyQualifiedName));
-					pango_description = PangoAmbience.Convert(parserService.GetClass(c.FullyQualifiedName));
-					c = null;
-				}
-				
 				// don't give a description string, if no documentation or description is provided
 				if (description.Length + documentation.Length == 0) {
 					return null;

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -19,6 +19,7 @@
 using MonoDevelop.Internal.Templates;
 using MonoDevelop.Services;
 using MonoDevelop.Internal.Parser;
+using MonoDevelop.Internal.Project;
 
 using MonoDevelop.SourceEditor.Gui;
 using Stock = MonoDevelop.Gui.Stock;
@@ -55,7 +56,7 @@
 		
 		ArrayList completionData = null;
 		
-		public ICompletionData[] GenerateCompletionData(string fileName, SourceEditorView textArea, char charTyped, TextMark triggerMark)
+		public ICompletionData[] GenerateCompletionData(IProject project, string fileName, SourceEditorView textArea, char charTyped, TextMark triggerMark)
 		{
 			completionData = new ArrayList();
 			this.fileName = fileName;
@@ -81,18 +82,19 @@
 				return (ICompletionData[])completionData.ToArray (typeof (ICompletionData));
 			}
 			if (ctrlspace && charTyped != '.') {
-				AddResolveResults (parserService.CtrlSpace (parserService, caretLineNumber, caretColumn, fileName));
+				AddResolveResults (parserService.CtrlSpace (parserService, project, caretLineNumber, caretColumn, fileName));
 				return (ICompletionData[])completionData.ToArray (typeof (ICompletionData));
 			}
 			if (charTyped == ' ') {
 				if (expression == "using" || expression.EndsWith(" using") || expression.EndsWith("\tusing")|| expression.EndsWith("\nusing")|| expression.EndsWith("\rusing")) {
-					string[] namespaces = parserService.GetNamespaceList("");
+					string[] namespaces = parserService.GetNamespaceList(project, "", true);
 					AddResolveResults(new ResolveResult(namespaces));
 				}
 			} else {
 				//FIXME: I added the null check, #D doesnt need it, why do we?
 				if (fileName != null) {
-					results = parserService.Resolve(expression, 
+					results = parserService.Resolve(project,
+													expression, 
 													caretLineNumber,
 													caretColumn,
 													fileName,

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CommentCompletionDataProvider.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CommentCompletionDataProvider.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CommentCompletionDataProvider.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -17,6 +17,7 @@
 using MonoDevelop.Services;
 
 using MonoDevelop.Internal.Parser;
+using MonoDevelop.Internal.Project;
 using MonoDevelop.SourceEditor.Gui;
 using Stock = MonoDevelop.Gui.Stock;
 
@@ -63,7 +64,7 @@
 			return row >= region.BeginLine && (row <= region.EndLine || region.EndLine == -1);
 		}
 		
-		public ICompletionData[] GenerateCompletionData (string fileName, SourceEditorView textArea, char charTyped, Gtk.TextMark triggerMark)
+		public ICompletionData[] GenerateCompletionData (IProject project, string fileName, SourceEditorView textArea, char charTyped, Gtk.TextMark triggerMark)
 		{
 			/*caretLineNumber = textArea.Caret.Line;
 			caretColumn     = textArea.Caret.Column;

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionWindow.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -11,6 +11,7 @@
 
 using Gtk;
 using MonoDevelop.SourceEditor.Gui;
+using MonoDevelop.Internal.Project;
 
 namespace MonoDevelop.SourceEditor.CodeCompletion
 {
@@ -28,6 +29,8 @@
 		int origOffset;
 		int num_in = 0;
 		DeclarationViewWindow declarationviewwindow = new DeclarationViewWindow ();
+		string fileName;
+		IProject project;
 		
 		string GetTypedString ()
 		{
@@ -281,8 +284,6 @@
 			//GdkWindow.Move (tx + wx, ty + wy);
 		}
 		
-		string fileName;
-		
 		public static new GLib.GType GType
 		{
 			get
@@ -296,9 +297,10 @@
 		/// <remarks>
 		/// Creates a new Completion window and puts it location under the caret
 		/// </remarks>
-		public CompletionWindow (SourceEditorView control, string fileName, ICompletionDataProvider completionDataProvider) : base (GType)
+		public CompletionWindow (SourceEditorView control, IProject project, string fileName, ICompletionDataProvider completionDataProvider) : base (GType)
 		{
 			this.fileName = fileName;
+			this.project = project;
 			this.completionDataProvider = completionDataProvider;
 			this.control = control;
 
@@ -340,7 +342,7 @@
 		
 		void FillList (bool firstTime, char ch)
 		{
-			ICompletionData[] completionData = completionDataProvider.GenerateCompletionData(fileName, control, ch, triggeringMark);
+			ICompletionData[] completionData = completionDataProvider.GenerateCompletionData(project, fileName, control, ch, triggeringMark);
 			if (completionData == null || completionData.Length == 0) {
 				return;
 			}

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ICompletionDataProvider.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ICompletionDataProvider.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/ICompletionDataProvider.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -9,6 +9,7 @@
 using System.Drawing;
 using System.Reflection;
 using System.Collections;
+using MonoDevelop.Internal.Project;
 
 using Gdk;
 
@@ -16,6 +17,6 @@
 
 namespace MonoDevelop.SourceEditor.CodeCompletion {
 	public interface ICompletionDataProvider {
-		ICompletionData[] GenerateCompletionData(string fileName, SourceEditorView textArea, char charTyped, Gtk.TextMark mark);
+		ICompletionData[] GenerateCompletionData(IProject project, string fileName, SourceEditorView textArea, char charTyped, Gtk.TextMark mark);
 	}
 }

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/TemplateCompletionDataProvider.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/TemplateCompletionDataProvider.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/TemplateCompletionDataProvider.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -12,6 +12,7 @@
 
 using MonoDevelop.Core.Properties;
 using MonoDevelop.Internal.Templates;
+using MonoDevelop.Internal.Project;
 using MonoDevelop.SourceEditor.Gui;
 using Stock = MonoDevelop.Gui.Stock;
 
@@ -26,7 +27,7 @@
 			}
 		}
 		
-		public ICompletionData[] GenerateCompletionData(string fileName, SourceEditorView textArea, char charTyped, Gtk.TextMark triggerMark)
+		public ICompletionData[] GenerateCompletionData(IProject project, string fileName, SourceEditorView textArea, char charTyped, Gtk.TextMark triggerMark)
 		{
 			CodeTemplateGroup templateGroup = CodeTemplateLoader.GetTemplateGroupPerFilename(fileName);
 			if (templateGroup == null) {

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorBuffer.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -193,14 +193,19 @@
 		
 		public void LoadFile (string file, string mime)
 		{
-			LoadText (File.OpenText (file).ReadToEnd (), mime);		
+			StreamReader sr = File.OpenText (file);
+			LoadText (sr.ReadToEnd (), mime);		
+			sr.Close ();
 			Modified = false;
 		}
 		
 		public void LoadFile (string file)
 		{
-			using (NoUndo n = new NoUndo (this))
-				Text = File.OpenText (file).ReadToEnd ();
+			using (NoUndo n = new NoUndo (this)) {
+				StreamReader sr = File.OpenText (file);
+				Text = sr.ReadToEnd ();
+				sr.Close ();
+			}
 			
 			Modified = false;
 			ScrollToTop ();

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -181,7 +181,7 @@
 
 			if (triggerIter.Equals (TextIter.Zero)) return;
 			triggerIter.ForwardChar ();
-			completionWindow = new CompletionWindow (this, ParentEditor.DisplayBinding.ContentName, new CodeCompletionDataProvider (true));
+			completionWindow = new CompletionWindow (this, ParentEditor.DisplayBinding.Project, ParentEditor.DisplayBinding.ContentName, new CodeCompletionDataProvider (true));
 			
 			completionWindow.ShowCompletionWindow (triggerChar, triggerIter, true);
 		}
@@ -304,7 +304,7 @@
 			case '.':
 				bool retval = base.OnKeyPressEvent (evnt);
 				if (EnableCodeCompletion) {
-					completionWindow = new CompletionWindow (this, ParentEditor.DisplayBinding.ContentName, new CodeCompletionDataProvider ());
+					completionWindow = new CompletionWindow (this, ParentEditor.DisplayBinding.Project, ParentEditor.DisplayBinding.ContentName, new CodeCompletionDataProvider ());
 					completionWindow.ShowCompletionWindow ((char)key, buf.GetIterAtMark (buf.InsertMark), false);
 				}
 				return retval;

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/IInsightDataProvider.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/IInsightDataProvider.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/IInsightDataProvider.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -11,12 +11,13 @@
 using System.Collections;
 
 using MonoDevelop.SourceEditor.Gui;
+using MonoDevelop.Internal.Project;
 
 namespace MonoDevelop.SourceEditor.InsightWindow
 {
 	public interface IInsightDataProvider
 	{
-		void SetupDataProvider(string fileName, SourceEditorView textArea);
+		void SetupDataProvider(IProject project, string fileName, SourceEditorView textArea);
 		
 		bool CaretOffsetChanged();
 		bool CharTyped();

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/IndexerInsightDataProvider.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/IndexerInsightDataProvider.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/IndexerInsightDataProvider.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -15,6 +15,7 @@
 using MonoDevelop.Internal.Templates;
 using MonoDevelop.Services;
 using MonoDevelop.Internal.Parser;
+using MonoDevelop.Internal.Project;
 
 using MonoDevelop.SourceEditor.Gui;
 using MonoDevelop.SourceEditor.CodeCompletion;
@@ -47,7 +48,7 @@
 		}
 		
 		int initialOffset;
-		public void SetupDataProvider(string fileName, SourceEditorView textArea)
+		public void SetupDataProvider(IProject project, string fileName, SourceEditorView textArea)
 		{
 			this.fileName = fileName;
 			this.textArea = textArea;
@@ -61,10 +62,10 @@
 			int caretLineNumber      = initialIter.Line + 1;
 			int caretColumn          = initialIter.LineOffset + 1;
 			IParserService parserService = (IParserService)ServiceManager.Services.GetService(typeof(IParserService));
-			ResolveResult results = parserService.Resolve(methodObject, caretLineNumber, caretColumn, fileName, textArea.Buffer.Text);
-			Console.WriteLine ("not null");
+			ResolveResult results = parserService.Resolve(project, methodObject, caretLineNumber, caretColumn, fileName, textArea.Buffer.Text);
+			
 			if (results != null && results.Type != null) {
-				foreach (IClass c in results.Type.ClassInheritanceTree) {
+				foreach (IClass c in parserService.GetClassInheritanceTree (project, results.Type)) {
 					foreach (IIndexer indexer in c.Indexer) {
 						methods.Add(indexer);
 					}

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -15,6 +15,7 @@
 
 using MonoDevelop.SourceEditor.Gui;
 using MonoDevelop.SourceEditor.CodeCompletion;
+using MonoDevelop.Internal.Project;
 
 namespace MonoDevelop.SourceEditor.InsightWindow
 {
@@ -28,6 +29,8 @@
 		Gtk.Label current;
 		Gtk.Label max;
 		string description;
+		string fileName;
+		IProject project;
 
 		StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService)); 
 		
@@ -45,7 +48,7 @@
 		
 		public void AddInsightDataProvider(IInsightDataProvider provider)
 		{
-			provider.SetupDataProvider(fileName, control);
+			provider.SetupDataProvider(project, fileName, control);
 			if (provider.InsightDataCount > 0) {
 				insightDataProviderStack.Push(new InsightDataProviderStackElement(provider));
 			}
@@ -105,17 +108,17 @@
 
 			}
 		}
-		string fileName;
 		
 		static InsightWindow ()
 		{
 			type = RegisterGType (typeof (InsightWindow));
 		}
 		
-		public InsightWindow(SourceEditorView control, string fileName) : base (type)
+		public InsightWindow(SourceEditorView control, IProject project, string fileName) : base (type)
 		{
 			this.control             = control;
 			this.fileName = fileName;
+			this.project = project;
 			/*System.Drawing.Point caretPos  = control.ActiveTextAreaControl.TextArea.Caret.Position;
 			System.Drawing.Point visualPos = new System.Drawing.Point(control.ActiveTextAreaControl.TextArea.TextView.GetDrawingXPos(caretPos.Y, caretPos.X) + control.ActiveTextAreaControl.TextArea.TextView.DrawingPosition.X,
 			          (int)((1 + caretPos.Y) * control.ActiveTextAreaControl.TextArea.TextView.FontHeight) - control.ActiveTextAreaControl.TextArea.VirtualTop.Y - 1 + control.ActiveTextAreaControl.TextArea.TextView.DrawingPosition.Y);*/

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/MethodInsightDataProvider.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/MethodInsightDataProvider.cs	2004-05-25 06:22:25 UTC (rev 1629)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/MethodInsightDataProvider.cs	2004-05-25 19:11:36 UTC (rev 1630)
@@ -15,6 +15,7 @@
 using MonoDevelop.Internal.Templates;
 using MonoDevelop.Services;
 using MonoDevelop.Internal.Parser;
+using MonoDevelop.Internal.Project;
 
 using MonoDevelop.SourceEditor.Gui;
 using MonoDevelop.SourceEditor.CodeCompletion;
@@ -50,7 +51,7 @@
 		}
 		
 		int initialOffset;
-		public void SetupDataProvider(string fileName, SourceEditorView textArea)
+		public void SetupDataProvider(IProject project, string fileName, SourceEditorView textArea)
 		{
 			this.fileName = fileName;
 			this.textArea = textArea;
@@ -87,14 +88,14 @@
 				}
 			}
 			IParserService parserService = (IParserService)ServiceManager.Services.GetService(typeof(IParserService));
-			ResolveResult results = parserService.Resolve(methodObject, caretLineNumber, caretColumn, fileName, text);
+			ResolveResult results = parserService.Resolve(project, methodObject, caretLineNumber, caretColumn, fileName, text);
 			
 			if (results != null && results.Type != null) {
 				if (contructorInsight) {
 					AddConstructors(results.Type);
 				} else {
-					foreach (IClass c in results.Type.ClassInheritanceTree) {
-						AddMethods(c, methodName, false);
+					foreach (IClass c in parserService.GetClassInheritanceTree (project, results.Type)) {
+ 						AddMethods(c, methodName, false);
 					}
 				}
 			}




More information about the Monodevelop-patches-list mailing list