[MonoDevelop] Managed Line Editor

Matej Urbas matej.urbas at gmail.com
Mon Oct 30 02:28:45 EST 2006


On Sun, 2006-10-29 at 17:37 -0800, Todd Berman wrote:
> On Mon, 2006-10-30 at 00:01 +0100, Lluis Sanchez wrote:
> <snip>
> > The fact is that the first editor that MD had was a port of the #D
> > editor. You can still find the code in SVN, under Unused/TextEditor.
> > After some months the editor was replaced by GtkSourceView. I think the
> > main reason was that GtkSourceView had most of the features that the #D
> > editor had, and it was already maintained by the GNOME project, so all
> > the development effort could then be focused on the IDE. It's a matter
> > of resource economy, GtkSoruceView gives a lot to MD for free. It's
> > better to have an editor that does, let's say 80% of what you need and
> > has zero cost of development and maintenance, than another that does
> > 100% but has a big cost in maintenance. #D did not have a choice, since
> > Windows does not have a text editor component comparable to the
> > GtkSourceView editor that GNOME provides.
> 
> The managed editor under Unused/TextEditor is a really old port of the
> #D editor from when MD's codebase was branched from SD. It would likely
> be useful to do almost all of that work over again, but I don't know
> what the diff to the original codebase is.
> 
> If you are looking to enhance the existing ported editor, one thing to
> do right off for a quick performance gain is layout lines instead of
> characters. To get something working quickly, we created a new
> Pango.Layout for every character, which is *painful*, using one per
> paragraph (where a paragraph has the pango meaning, ie explicit line
> ending) would net you a large win.
> 
> 
> Regardless of all of that, none of the features mentioned in a previous
> email (pasted here)
> 
> 
>   - on the fly syntax checking (printing out syntax problems - like
> eclipse does - or VS 2005)
> 
>   - more dynamic and context aware syntax highlighting (the 'value'
> keyword in Setters - C#)
> 
>   - context aware indentation engines (empty lines with indentation -
> VS.NET behaviour, code auto-styling engines - VS.NET 2005)
> 
>   - context aware code completion engines (expected types - useful in
> 'new' expressions)
> 
>   - auto-refactoring (the same as VS.NET 2005 - when changing names of
> variables, types or methods...)
> 
> 
> would require a managed editor except (possibly) the dynamic and context
> aware syntax highlighting. In fact, other than that feature (which is
> the least useful of all the features mentioned), writing a new editor is
> a step back, or at least sideways.

Oh, I thought it is more about having an editor we can easily modify to
suit MonoDevelop's needs (or any other Mono apps for that matter). To
add new features as we go...

Well, MonoDevelop really is very featureful right now - in fact, there
is no immediate need for any kind of new editor editor, be it managed or
not - I agree.

He he, if we fail at producing a new and usable editor it will at least
not mean the end of the world :) Perhaps GtkSourceView will get much
better in the time we come up with a usable editor :) - would be even
cooler :)

If the endeavor in itself is not really prospective or practical, I
think it's at least fun to think about it :)


Enjoy,
---
Matej



More information about the Monodevelop-list mailing list