[MonoDevelop] Coordinate system refactoring
Mike Krüger
mkrueger at novell.com
Wed Jul 21 08:04:32 EDT 2010
Hi
>>> 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 ();
>
>
I'll postpone this change till we can ref GTK from the dom assembly.
Regards
Mike
More information about the Monodevelop-list
mailing list