Posted 14 years ago by Iurii Gazin
Version: 4.0.0282
Avatar
Hello. I`m trying to create custom lang. realization for the SyntaxEditor.
Could u have examples or docs how to implement Intellisense for it?

For example, I need to fill memberList with values according to current type typed (for C# it is '.' char). How can I find out, with type was typed by user? I`m trying to create Cpp.Net simple realization, so how can I use your C# Lexical parser for this task (really believe that Cpp Lexical parser would not be much differ from C#)? How can I customize it?
Sorry, there is many questions, and too little answers :( Help plz.

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Iurii,

Our "Simple" language sample in the sample project shows a relatively small implementation of a language that can do lexing, semantic parsing, AST building, and automated IntelliPrompt. That is a good reference for how to build such functionality.

This page also describes the general steps we implemented for the .NET add-on to achieve those features:
http://www.actiprosoftware.com/Products/DotNet/WindowsForms/SyntaxEditor/Addons/DotNet/ImplementationDetails.aspx

The .NET add-on isn't currently designed to be openly accessible for other languages. Also since the C# lexer for it is programmatic (written in code), you can tweak some things but others would require a new implementation of it. Your best bet if you want to reuse pieces of the add-on for a custom c++.NET language would be to purchase the add-on and its Blueprint source code. Then you can take out the bits and pieces of what you need to make it work.

As we move forward with development of our next gen SyntaxEditor framework (being prototyped with the WPF version), one plan is to make a lot of the core .NET add-on internals more accessible for people like you who wish to reuse logic we've written. However it will be a while yet before we are at a point where can do that.


Actipro Software Support

Posted 4 years ago by Noor
Avatar

Any update about this topic. I want to add intellisense according to the context of my custom designed language. Can we do it using syntax editor.

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

In the 2020.1 version, we updated the WinForms SyntaxEditor API to be the same as the newer API we've been using in the WPF and UWP for a while.  This version has a lot more flexibility for displaying completion lists.  The process is that you must make something that is able to determine the "context" of your request at an offset.  This logic generally involves doing some token scanning and examining the AST nodes (from the last parse) containing the offset, and determining context data based on that.  AST nodes are the output from a parser that you make for the language.  Anyhow once you have a context, you can determine how to populate a completion session from within a completion provider service.

Our Getting Started series of QuickStarts that come in the sample project walk through the implementation of many language features.  The custom language demoed there is simplistic in nature but is a good starting point since it codes everything from parsing to IntelliPrompt to text formatting, and so on.


Actipro Software Support

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.