[MonoDevelop] Managed Line Editor

Todd Berman tberman at off.net
Sun Oct 29 20:37:54 EST 2006


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.

--Todd



More information about the Monodevelop-list mailing list