new to XWT. What XML editor to use

237 views
Skip to first unread message

Mike

unread,
Jun 12, 2015, 12:29:06 PM6/12/15
to xwt-...@googlegroups.com
I'm trying to make an addin for Xamarin Studio and I need a XML editor.
Is there one I can use?
Thanks!

Mike

unread,
Jun 12, 2015, 12:29:25 PM6/12/15
to xwt-...@googlegroups.com
To be specific, I need a XML editor control.

Mike

unread,
Jun 12, 2015, 7:35:16 PM6/12/15
to xwt-...@googlegroups.com
I can see another thread about Mono.TextEditor.
But it doesn't look like it will work isn't it?

Mike

unread,
Jun 17, 2015, 2:45:21 AM6/17/15
to xwt-...@googlegroups.com
Anyone ?

Luís Reis

unread,
Jun 17, 2015, 9:35:00 AM6/17/15
to xwt-...@googlegroups.com
Hello,

What do you mean a XML editor? Do you want to add XML support to Xamarin Studio? Because I'm pretty sure it already comes with a built-in syntax highlighter for that, no add-on needed.

Luís

Anyone ?
--
You received this message because you are subscribed to the Google Groups "XWT Widget Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xwt-list+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike

unread,
Jun 18, 2015, 3:35:00 AM6/18/15
to xwt-...@googlegroups.com
Hi Luis,

Yes, I need a XML editor control similar to the existing one.
Ideally, would be great if I could instantiate that one and add it in the UI of my addon. Is that possible?

Thanks!
Andrei

Luís Reis

unread,
Jun 18, 2015, 4:22:41 AM6/18/15
to xwt-...@googlegroups.com
Probably.

The controller you are looking for *is* the Mono.TextEditor, but not the version mentioned elsewhere in this mailing list. The version you want is the one bundled with Xamarin Studio. The trouble is, I'm pretty sure that it is written in GTK+, not XWT, so you'll have to create some sort of wrapper it somehow in order to use it from the XWT side of Xamarin Studio.

You should be able to set it to XML syntax highlighting mode by setting the Document.MimeType property to "text/xml".

Luís

Mike

unread,
Jun 18, 2015, 5:23:05 AM6/18/15
to xwt-...@googlegroups.com
Meanwhile I actually made it work.
I didn't realize I actually need a Gtk widget not a Xwt, because that's what the addin is using.
I was able to add Mono.TextEditor. 
But now I have trouble understanding some things regarding file editing works.
For example, how MonoDevelop.Ide.Gui.IViewContent:IsDirty  or IsFile, IsReadOnly works
I want to make the "Save" option enabled in the File menu. 
I guess it's something related to MonoDevelop.Ide.Gui.Document. I probably have to signal somehow that document is changed.
I've no idea how all this works.... I don't know where to look for this info

Luís Reis

unread,
Jun 18, 2015, 6:31:49 AM6/18/15
to xwt-...@googlegroups.com
Have you tried to monodevelop mailing list? XamarinStudio is based on MonoDevelop, so they'll probably be able to help.

The IsReadOnly property is probably what sets whether the user is allowed to modify the text (read-only documents can not be modified, only viewed).
Not sure about IsDirty, maybe it controls whether the "You have unsaved changes" dialog when a tab is closed without saving?

No clue about IsFile. At least, not without reading the code.

Mike

unread,
Jun 18, 2015, 8:01:23 AM6/18/15
to xwt-...@googlegroups.com
Thank you Luis !
Reply all
Reply to author
Forward
0 new messages