[Monodevelop-devel] Working on the monodevelop dom after 2.2

Mike Krüger mkrueger at novell.com
Sat Sep 26 09:03:59 EDT 2009


Hi

> This is more or less what non-.NET languages have to do currently:
> Munge some stuff into the DOM for 1), custom implementation for 2), 3)
> [which is refactoring also, isn't it?] is basically impossible.
> 
> I'm on board with a unified, high-level DOM for populating
> quickfinder, classpad, etc. [Zeroth bullet]
> If this part is generalized enough to support native hierarchy
> structures for various languages [currently missing], easily updatable
> [currently exists], and easily and flexibly queryable from addin code
> [currently missing], completion doesn't necessarily require its own
> DOM, just some completion hooks similar to the existing ones. Things
> like Goto Definition and Find References could operate at this level
> as well.

Some questions:
1) How do you do code completion without an own DOM? I mean you need to
find out which construct the user wants to complete.
2) How do you do Find References without an own DOM? Don't you need to
traverse the language specific DOM for it?
3) Same for goto definition. (need to find out which construct etc.)

> Similarly, there's no reason that the same overall storage mechanism
> couldn't be used for .NET and non-.NET parse databases, as long as
> hooks are exposed for specializing the storage process for specific
> DOM implementations.
> 
> I would LOVE to see enough assumptions neutralized that I could enable
> Stetic or hook into existing refactoring operations for a specific,
> arbitrary language.
> 

Existing refactoring will move to the c# backend :/. I don't see a way
to generalize them accross languages that don't share a specific 'down
to expression level' DOM. 
(Otherwise than having a general refactoring API that would be:

interaface IRefactoring {
 void ExtractMethod ...
 void RemoveTemporaryVariable ...
 void InsertVariable ...
 void RemoveBackingStore ...

..
}

I think the general refactoring ends where the 'FindAllReferences'
function ends :(. But I'm open for ideas here.

Regards
Mike



More information about the Monodevelop-devel-list mailing list