Hi all
I try to get the syntax editor to run.
At the moment I'm having trouble getting XML commenting to run.
One or more lines of XML should be commented or uncommented.
Here is my code
var xmlLanguage = new XmlSyntaxLanguage();
syntaxEditor.Document.Language = xmlLanguage;
//try
//{
// var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("XTOOLZ.X_Edit.Editor.Lexers.ActiproSoftware.XML.xml");
// syntaxEditor.Document.LoadLanguageFromXml(stream, 0);
//}
//catch (Exception e)
//{
// Console.WriteLine(e);
//}
SemanticParserService.Start();
//syntaxEditor.Document.Language.LineCommentDelimiter="<!--";
syntaxEditor.Document.Outlining.Mode = OutliningMode.Automatic;
syntaxEditor.Document.SemanticParsingEnabled = true;
syntaxEditor.Document.LexicalParsingEnabled = true;
syntaxEditor.Document.LineModificationMarkingEnabled = true;
_schemaResolver = new XmlSchemaResolver();
syntaxEditor.Document.LanguageData = _schemaResolver;
The Comment/Uncomment is done like that
syntaxEditor.SelectedView.UncommentLines();
syntaxEditor.SelectedView.CommentLines();
The good thing, no error occures - the bad, the code doesn't comment the xml :-/
Any Help is welcome !
Peter