add a child language dynamically

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by ori
Version: 4.0.0256
Avatar
Hello,

I wanted to know if there is a way to load an existing language (like HTML, I copied the language definition file from the demo) and on run time add a new child language to the existing language (add a start scope, end scope and inner language)

In addition - I just wanted to be sure. Should I use the files from the test project? why isn't it a part of the SyntaxEditor's version?

Thanks.

Comments (2)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes there is a dynamic creation form in the sample project that shows how to merge two languages programmatically. I think there is a help topic on this too.

Yes you can use anything in our test project. Which files you are indicating that you wish you were part of the built-in package? Most of the things in the sample project are intended to be customized further by you, and/or used for learning purposes.


Actipro Software Support

Posted 17 years ago by ori
Avatar
Thanks - I looked at the sample project and there is an example exactly for what I asked.

As for your question - I think it is really good design that the language definitions are configurable and it is possible to define a new language. But if I use the c# xml definition and syntax code file I have to include it in my projet and do some ugly stuff (like changing the SyntaxLanguageTypeName) and next time when I get a new version of the syntax-editor I will have to update these files. It will be much better if these files will be part of the package somehow.
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.