[MonoDevelop] Removing SourceEditor{View, Buffer} dependancy from CompletionListWindow.

Lluis Sanchez lluis at ximian.com
Tue Jul 19 04:52:02 EDT 2005


Hi,

The patch looks like a good start. Here are some comments:

      * prepareCompletionDetails -> PrepareCompletionDetails

      * You should avoid using a property like ICompletionWidget.Text.
        Loading the entire file text in memory is a bad practice. I know
        we are doing it in other places but it shouldn't be done. In
        most of cases you can use methods such as for example: string
        GetText (int startOffset, int endOffset).

      * Methods in TextUtilities should take a ICompletionWidget as
        parameter and use its methods to get the text it needs. The same
        for ICompletionDataProvider, TemplateCompletionDataProvider and
        CommentCompletionDataProvider.

      * Please give more meaningful names to ICompletionWidget
        properties (what does X and Y refer to?). 

      * ICompletionData.InsertAction should also take a
        ICompletionWidget as parameter. 

      * CompletionWindow.cs is obsolete, it can be removed. 

> Indeed, this makes a lot of sense. Here are two patches, the first
> creates exactly that adaptor interface, ICompletionWidget, which I've
> put in MonoDevelop.Base/Gui/Completion/. Note that none of the stuff
> from the completion window is moved yet by this path. Those things would
> also need to be moved out of the editor assembly and into the base one.
> 
> The second patch is to the Boo addin, and adds the necessary foo to get
> code completion working for that, using the new interface. Note that I
> did not provide a general implementation on a Gtk.TextView, as there's
> deps on GtkSourceView for both, and I know the editor is trying *not* to
> be so dependant on that currently, etc, etc, etc.
> 
> No ChangeLog included again, since I definitely want more feedback,
> testing, whatnot on this before I even consider proposing this for
> inclusion.
> 
> Thoughts? Problems with it? Regressions? Want me to implement completion
> for some other random spot too to test this out?
> 
> -pete
> 
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list



More information about the Monodevelop-list mailing list