Using SyntaxEditor for an IronPython editor (for scripting)

SyntaxEditor for WPF Forum

Posted 8 years ago by Leon
Avatar
Hi,

I am new to SyntaxEditor and I want to use it for my 3d app, where I provide IronPython scripting for artists.

I am wondering as of the latest version of this control (preferrably WPF), what is possible and not possible for this scenario?

For instance:

1. Is IronPython provided as a sample language for me to just plug it in?
2. If not, can I use the Python template you have as is (I assume you have Python as a sample language)?
3. Can I have intellisense? For instance (Global.Scene.Objects, etc)
4. Other things you can think of (for possibilities and limitations)?

Thanks a lot for your help.

[Modified at 05/30/2011 02:49 PM]

Comments (4)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Leon,

Thanks for writing.

1/2) We do offer a Python free sample language but it just does syntax highlighting.

3) You'd have to add that. With our .NET Languages Add-on we have an object model for managing reflection data that you could query. But you still would need a grammar/parser for IronPython that builds up an AST using our .NET Languages Add-on's AST node types, a context factory, and completion/quick info providers that tie all that together with our add-on's resolver to figure out what is what.

There is a lot of work that goes into automated IntelliPrompt. All of that can be several weeks of work, even with all the language-neutral .NET related object model features we have in the .NET Languages Add-on (which would normally be another many weeks of work if you didn't reuse it). If you want to build a custom language for IronPython with automated IntelliPrompt then your best bet might be to get a license for the .NET Languages Add-on plus its source code. You can reuse any of its common DotNet namespace types in your own language and you can clone our CSharp/VB types as appropriate as a starter for your own IronPython types. It would get you going faster than starting from scratch since all our code shows how to achieve automated completion lists and quick info now.


Actipro Software Support

Posted 8 years ago by Leon
Avatar
Hi,

Thanks for replying.

Does the Python sample you provide, not even allow basic features like expanding/collapsing sections like for functions, etc?

Just wondering if the other features other than syntax highlighting are more of a "all or nothing" where you have to implement a full language in order to have all these features?

Other than that, if I give up IntelliPrompt, would it still make the editor usable for Python scripting? IntelliPrompt isn't too critical to have if it's gonna make things much easier to implement and faster to release.

Also do you guys provide some sort of wizard to setup basic language features? I read some old discussions about it, that's why I ask.




Thanks again.

[Modified at 05/31/2011 04:07 PM]
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Leon,

Sorry but the Python sample just includes syntax highlighting at this time.

SyntaxEditor languages are extremely flexible in that they are designed to use language services to provide various features. This means that they are not an all-or-nothing sort of scenario. You can choose to just add automatic outlining, or can just add things like indent providers or text formatters, etc. You pick the menu of services to add.

If you wanted to add automatic outlining, there are two methods for doing so. One is done by token scanning (same thread) and the other from parser results (worker thread, better for large docs). Demonstrations of how to achieve both for Javascript are shown in the Code Outlining QuickStarts. Check those out and you can apply the techniques shown there to Python. The Getting Started #6 QuickStart also shows code outlining.

What we do in our .NET Languages Add-on is that we have a full grammar-based parser and then we examine the AST nodes to generate the outlining node ranges. But again, per our samples, you can implement automatic outlining without having to create a full language parser.

We do have a wizard for creating a new language but that's more for generating a lexer (for syntax highlighting).


Actipro Software Support

Posted 8 years ago by Leon
Avatar
Thanks for replying. I will come back if I have other questions along the way.
The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.