зеркало из https://github.com/mono/mail-archives.git
133 строки
6.9 KiB
HTML
133 строки
6.9 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE> [Monodevelop-patches-list] r1269 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
|
||
|
</TITLE>
|
||
|
<LINK REL="Index" HREF="index.html" >
|
||
|
<LINK REL="made" HREF="mailto:monodevelop-patches-list%40lists.ximian.com?Subject=%5BMonodevelop-patches-list%5D%20r1269%20-%20in%20trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor%3A%20.%20CodeCompletion&In-Reply-To=">
|
||
|
<META NAME="robots" CONTENT="index,nofollow">
|
||
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||
|
<LINK REL="Previous" HREF="000875.html">
|
||
|
<LINK REL="Next" HREF="000877.html">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#ffffff">
|
||
|
<H1>[Monodevelop-patches-list] r1269 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion</H1>
|
||
|
<B>commit-watcher at mono-cvs.ximian.com</B>
|
||
|
<A HREF="mailto:monodevelop-patches-list%40lists.ximian.com?Subject=%5BMonodevelop-patches-list%5D%20r1269%20-%20in%20trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor%3A%20.%20CodeCompletion&In-Reply-To="
|
||
|
TITLE="[Monodevelop-patches-list] r1269 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion">commit-watcher at mono-cvs.ximian.com
|
||
|
</A><BR>
|
||
|
<I>Sat Mar 27 18:21:14 EST 2004</I>
|
||
|
<P><UL>
|
||
|
<LI>Previous message: <A HREF="000875.html">[Monodevelop-patches-list] r1268 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
|
||
|
</A></li>
|
||
|
<LI>Next message: <A HREF="000877.html">[Monodevelop-patches-list] r1270 - in trunk/MonoDevelop/src/Main/Base: . Commands
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#876">[ date ]</a>
|
||
|
<a href="thread.html#876">[ thread ]</a>
|
||
|
<a href="subject.html#876">[ subject ]</a>
|
||
|
<a href="author.html#876">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<!--beginarticle-->
|
||
|
<PRE>Author: tberman
|
||
|
Date: 2004-03-27 18:21:14 -0500 (Sat, 27 Mar 2004)
|
||
|
New Revision: 1269
|
||
|
|
||
|
Modified:
|
||
|
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
|
||
|
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
|
||
|
Log:
|
||
|
using ExpressionFinder if it exists.
|
||
|
|
||
|
|
||
|
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
|
||
|
===================================================================
|
||
|
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-03-27 23:03:30 UTC (rev 1268)
|
||
|
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2004-03-27 23:21:14 UTC (rev 1269)
|
||
|
@@ -1,3 +1,8 @@
|
||
|
+2004-03-27 Todd berman <<A HREF="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">tberman at sevenl.net</A>>
|
||
|
+
|
||
|
+ * CodeCompletion/CodeCompletionDataProvider.cs: use the
|
||
|
+ ExpressionFinder if it exists.
|
||
|
+
|
||
|
2004-03-27 Todd Berman <<A HREF="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">tberman at sevenl.net</A>>
|
||
|
|
||
|
* CodeCompletion/CodeCompletionDataProvider.cs: add refactorying of
|
||
|
|
||
|
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs
|
||
|
===================================================================
|
||
|
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs 2004-03-27 23:03:30 UTC (rev 1268)
|
||
|
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CodeCompletionDataProvider.cs 2004-03-27 23:21:14 UTC (rev 1269)
|
||
|
@@ -59,40 +59,21 @@
|
||
|
|
||
|
caretLineNumber = insertIter.Line + 1;
|
||
|
caretColumn = insertIter.LineOffset + 1;
|
||
|
- string expression = TextUtilities.GetExpressionBeforeOffset (textArea, insertIter.Offset);
|
||
|
+ //string expression = TextUtilities.GetExpressionBeforeOffset (textArea, insertIter.Offset);
|
||
|
ResolveResult results;
|
||
|
|
||
|
- if (expression.Length == 0) {
|
||
|
- return null;
|
||
|
- }
|
||
|
-
|
||
|
- IParserService parserService = (IParserService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IParserService));
|
||
|
+ IParserService parserService = (IParserService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IParserService));
|
||
|
+ IExpressionFinder expressionFinder = parserService.GetExpressionFinder(fileName);
|
||
|
+ string expression = expressionFinder == null ? TextUtilities.GetExpressionBeforeOffset(textArea, insertIter.Offset) : expressionFinder.FindExpression(textArea.Buffer.GetText(textArea.Buffer.StartIter, insertIter, true), insertIter.Offset - 2);
|
||
|
+ Console.WriteLine ("Expression: >{0}<", expression);
|
||
|
if (charTyped == ' ') {
|
||
|
if (expression == "using" || expression.EndsWith(" using") || expression.EndsWith("\tusing")|| expression.EndsWith("\nusing")|| expression.EndsWith("\rusing")) {
|
||
|
string[] namespaces = parserService.GetNamespaceList("");
|
||
|
-// AddResolveResults(new ResolveResult(namespaces, ShowMembers.Public));
|
||
|
AddResolveResults(new ResolveResult(namespaces));
|
||
|
-// IParseInformation info = parserService.GetParseInformation(fileName);
|
||
|
-// ICompilationUnit unit = info.BestCompilationUnit as ICompilationUnit;
|
||
|
-// if (unit != null) {
|
||
|
-// foreach (IUsing u in unit.Usings) {
|
||
|
-// if (u.Region.IsInside(caretLineNumber, caretColumn)) {
|
||
|
-// foreach (string usingStr in u.Usings) {
|
||
|
-// results = parserService.Resolve(usingStr, caretLineNumber, caretColumn, fileName);
|
||
|
-// AddResolveResults(results);
|
||
|
-// }
|
||
|
-// if (u.Aliases[""] != null) {
|
||
|
-// results = parserService.Resolve(u.Aliases[""].ToString(), caretLineNumber, caretColumn, fileName);
|
||
|
-// AddResolveResults(results);
|
||
|
-// }
|
||
|
-// }
|
||
|
-// }
|
||
|
-// }
|
||
|
}
|
||
|
} else {
|
||
|
//FIXME: I added the null check, #D doesnt need it, why do we?
|
||
|
if (fileName != null) {
|
||
|
- //Console.WriteLine ("resolve " + lang);
|
||
|
results = parserService.Resolve(expression,
|
||
|
caretLineNumber,
|
||
|
caretColumn,
|
||
|
|
||
|
|
||
|
</PRE>
|
||
|
|
||
|
<!--endarticle-->
|
||
|
<HR>
|
||
|
<P><UL>
|
||
|
<!--threads-->
|
||
|
<LI>Previous message: <A HREF="000875.html">[Monodevelop-patches-list] r1268 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
|
||
|
</A></li>
|
||
|
<LI>Next message: <A HREF="000877.html">[Monodevelop-patches-list] r1270 - in trunk/MonoDevelop/src/Main/Base: . Commands
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#876">[ date ]</a>
|
||
|
<a href="thread.html#876">[ thread ]</a>
|
||
|
<a href="subject.html#876">[ subject ]</a>
|
||
|
<a href="author.html#876">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
|
||
|
<hr>
|
||
|
<a href="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">More information about the Monodevelop-patches-list
|
||
|
mailing list</a><br>
|
||
|
</body></html>
|