Author: mkrueger
Date: 2007-11-08 03:41:25 -0500 (Thu, 08 Nov 2007)
New Revision: 89178
Modified:
trunk/monodevelop/Extras/CSharpBinding/ChangeLog
trunk/monodevelop/Extras/CSharpBinding/Gui/CSharpTextEditorExtension.cs
trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs
Log:
* Gui/CSharpTextEditorExtension.cs, Parser/Resolver.cs: Fixed "Bug
335140 - MD does not exlude this class from base classes list".
Modified: trunk/monodevelop/Extras/CSharpBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-11-08 07:46:28 UTC
(rev 89177)
+++ trunk/monodevelop/Extras/CSharpBinding/ChangeLog 2007-11-08 08:41:25 UTC
(rev 89178)
@@ -1,3 +1,8 @@
+2007-11-08 Mike Krüger <[EMAIL PROTECTED]>
+
+ * Gui/CSharpTextEditorExtension.cs, Parser/Resolver.cs: Fixed "Bug
335140 -
+ MD does not exlude this class from base classes list".
+
2007-11-07 Mike Krüger <[EMAIL PROTECTED]>
* Gui/CSharpTextEditorExtension.cs: Fixed "Bug 339480 - Crash in XML
comment
Modified:
trunk/monodevelop/Extras/CSharpBinding/Gui/CSharpTextEditorExtension.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Gui/CSharpTextEditorExtension.cs
2007-11-08 07:46:28 UTC (rev 89177)
+++ trunk/monodevelop/Extras/CSharpBinding/Gui/CSharpTextEditorExtension.cs
2007-11-08 08:41:25 UTC (rev 89178)
@@ -674,9 +674,20 @@
ExpressionFinder expressionFinder = new
ExpressionFinder (null);
+ int i = ctx.TriggerOffset;
+ // Base class completion
+ if (charTyped == ' ' && GetPreviousToken (":", ref i,
false)) {
+// if (i + 2 != ctx.TriggerOffset)
+// return null;
+ IParserContext pctx = GetParserContext ();
+ CodeCompletionDataProvider cp = new
CodeCompletionDataProvider (pctx, GetAmbience ());
+ Resolver res = new Resolver (pctx);
+ ResolveResult results = res.Resolve (":",
caretLineNumber, caretColumn, FileName, Editor.Text);
+ cp.AddResolveResults (results, false,
res.CreateTypeNameResolver ());
+ return cp;
+ }
+
// Code completion of "new"
-
- int i = ctx.TriggerOffset;
if (charTyped == ' ' && GetPreviousToken ("new", ref i,
false)) {
string token = GetPreviousToken (ref i, true);
if (token == "=" || token == "throw") {
Modified: trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs
===================================================================
--- trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs 2007-11-08
07:46:28 UTC (rev 89177)
+++ trunk/monodevelop/Extras/CSharpBinding/Parser/Resolver.cs 2007-11-08
08:41:25 UTC (rev 89178)
@@ -292,6 +292,20 @@
expression = expression.TrimStart (null);
if (expression.Length == 0)
return null;
+ if (expression == ":") {
+ IClass callingClass = this.GetCallingClass
(caretLineNumber, caretColumn, fileName, true);
+ if (callingClass != null &&
callingClass.Region.BeginLine == caretLineNumber) {
+ LanguageItemCollection items = new
LanguageItemCollection();
+ LanguageItemCollection content =
parserContext.CtrlSpace (caretLineNumber, caretColumn, fileName);
+ for (int i = 0; i < content.Count; ++i)
{
+ IClass c = content[i] as IClass;
+ if (c != null &&
IsClassInInheritanceTree (callingClass, c))
+ continue;
+ items.Add (content[i]);
+ }
+ return new ResolveResult (items);
+ }
+ }
if (expression == "value") {
IClass callingClass = this.GetCallingClass
(caretLineNumber, caretColumn, fileName, true);
if (callingClass != null) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches