[MonoDevelop] Source analysis, code completion, syntax coloring

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Jun 6 18:21:39 UTC 2012


On 24 May 2012 11:06,  <forumer at smartmobili.com> wrote:
> I would like some information about the way source analysis and code
> completion works on monodevelop.
> Let's say I would like to add support for a new non .net language (for
> instance objective-c),
> how am I supposed to do it ?

We don't have good documentation on this - your best bet is to look at
existing addins in the MD source, for example the C# addin. This email
thread may also be useful:
http://lists.ximian.com/pipermail/monodevelop-list/2010-January/011207.html

> Would it be possible to implement this source analysis inside a native dll
> that could be also used
> for instance to create a Visual addin ?

You mean a Visual Studio addin? Sure, you could write a VS addin and a
MD addin that used the same library, and long as the library was
portable. However, there would be a lot of IDE-specific integration
code too.

> If I use an external dll, can I pass the content of the file currently
> edited to it and "mark" token ?
> What are the entry points between editor and syntax highlighting ?

Basic highlighting uses a XML-based rule language, e.g.
https://github.com/mono/monodevelop/blob/master/main/src/core/Mono.Texteditor/SyntaxModes/CSyntaxMode.xml.
Custom highlighting modes allows you to do more advanced parsing, e.g.
as in the C# semantic highlighting:
https://github.com/mono/monodevelop/blob/master/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list