[MonoDevelop] Coordinate system refactoring
Lluis Sanchez Gual
slluis.devel at gmail.com
Wed Jul 21 07:30:18 EDT 2010
El dl 19 de 07 de 2010 a les 11:20 -0400, en/na Michael Hutchinson va
> On Mon, Jul 19, 2010 at 4:13 AM, Mike Krüger <mkrueger at novell.com> wrote:
> > What I want:
> > To be able to write:
> > Caret.Location = member.Location.
> > Instead of:
> > Caret.Location = new DocumentLocation (member.Location.Line - 1,
> > member.Location.Column - 1);
> > And no confusion in the coordine systems in 'other parts of the IDE'.
> > What we need:
> > + A reference to Mono.TextEditor from Mono.Core & replacing DomLocation
> > with DocumentLocation
> I thought we were disallowing GTK refs in MonoDevelop.Core...
That's correct. No GTK refs in MD.Core.
> My suggestion would be to make DomLocation 0-based and to add an
> implicit cast both ways between DocumentLocation and DomLocation.
Another option that would not require an assembly reference is to create
an extension method which would allow for example:
Caret.Location = member.Location.ToDocumentLocation ();
More information about the Monodevelop-list