[MonoDevelop] Managed Line Editor

Matej Urbas matej.urbas at gmail.com
Sun Oct 29 15:51:01 EST 2006


On Sun, 2006-10-29 at 20:16 +0000, Michael Hutchinson wrote:
> On 10/29/06, Matej Urbas <matej.urbas at gmail.com> wrote:
> > Create a source editor with GTK# and Pango? Take a look at how
> > SharpDevelop's, NetBeans' or Eclipse's (my favourite) editors manage
> > things? Better integrate parsers with editors?
> 
> The only major issue you *might* have with a managed editor is
> performance -- I think the #D guys had some trouble there IIRC -- but
> there are plenty of advantages. You could even port #D's editor
> directly from its current SWF to GTK#/Cairo/Pango, though I think that
> MD's architecture has diverged quite a bit in that area. If you
> implement the interfaces in MonoDevelop.Ide.Gui.Content, then most of
> the existing text editing features should work fine. The #D book
> (which is now free) might have some stuff about how they wrote the
> editor. I remember seeing an interesting document a couple of years
> back about how they'd designed it.

Yes, performance should not be a stopping factor (well, it isn't for NB
or Eclipse - both of which have their editors written in Java).

Porting SD's editor or maybe producing a feature compatible one is what
I'm after.

> 
> I don't know how useful integrating the editor with the parser would
> be -- what ideas do you have in that area? I would more be thinking
> about ease of adding code folding, error underlining, line
> modification indication, complicated syntax highlighting schemes...

When talking about a tighter integration with a parser,  I was thinking
more about the editor to be more aware of the language it is displaying.
for example:

  - 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...)

  - you name it :-)

I've got the impression that all of these features need some kind of
very tightly integrated (and smart) engine - an engine that knows the
language very well and also knows how to work with the editor...

> 
> Fully managed text buffers would alse be useful for having more than
> one active view of a buffer, for split panes or different editor
> interfaces.
> 

I was planning to look into SD, Eclipse and NetBeans (their code
actually) and only take the best design ideas from them.

I have a very vague idea on how source editors work... And already see,
that I will progress only slowly on this front...

Any help is very very much appreciated.

Enjoy
---
Matej



More information about the Monodevelop-list mailing list