[MonoDevelop] How do I add support for other file types?

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Feb 7 08:53:18 EST 2007

On 2/7/07, Lluis Sanchez <lluis at ximian.com> wrote:
> El dc 07 de 02 del 2007 a les 01:20 -0700, en/na John Anderson va
> escriure:
> > Hey, I was wondering if anyone could point me in the right direction
> > of where to add support for other file types into monodevelop.
> MonoDevelop depends on GnomeVfs for getting the (mime) type of a file.
> So, if the file is properly registered in Gnome, it should work.
> Right now there is no way to register mime types for files in
> MonoDevelop. I wonder if it would make sense to implement that.

On Ubuntu 6.10, all the ASP.NET mime types are recognised. However,
they aren't handled by the default source view for some reason, so I
wrote a pseudo-DisplayBinding
(Extras/AspNetAddIn/Project/AspNetDisplayBinding.cs) that simply
redirects it to a display binding that handles text. Getting the
source view to open them directly involves messing around with mime
types, but I'm not sure how.

To get syntax highlighting to work involves registering .lang files
for GtkSourceView that can handle the correct mime types. Examples are
at http://svn.gnome.org/viewcvs/gtksourceview/trunk/gtksourceview/language-specs/
and an ASP.NET lang file is at http://bugzilla.gnome.org/show_bug.cgi?id=139968.
Unfortunately there's no mechanism for having regions of one language
(eg. VB.NET, C#) embedded in a file of another language (ASP.NET
markup). Code completion suffers from this same problem: it can be
done, but it's going to be difficult.

Michael Hutchinson

More information about the Monodevelop-list mailing list