Child language and Intellisense

SyntaxEditor for WPF Forum

Posted 7 years ago by Chris
Version: 12.2.0570
Avatar

Can Intellisense functions be applied to a child language in a merged language context? I've tried your sample in QuickStart/LanguageTransitions, and tried the class AspStyleTransitionSyntaxLanguage. When entering the child language (CSharp) in the editor, nothing happens on Ctrl+Space for example, even though I have used the RegisterProjectAssembly method to register my assemblies. When the same language is the primary one, Intellisense is working as expected.

How can I achieve Intellisense in this case? Is it possible?

Comments (6)

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

Hi Chris,

In that scenario, you'd need your root language to have IntelliPrompt services that are wrappers for each language-specific IntelliPrompt provider.  They'd probably want to look at the requested offset/context to see if it's your parent or child language and then chain off to the appropriate child IntelliPrompt provider.

On a side note, we do have an internal sample of an ASP-like language that has a child language from the .NET Languages Add-on and shows how to get the child language to have automated IntelliPrompt.  If you'd like that, send us an e-mail since it sounds like it may be close to what you're trying to do.


Actipro Software Support

Posted 5 years ago by Frank Wisniewski
Avatar

Thanks Chris,

I was able to get the demo working but noticed that it was not getting the intellisense right, I tested it by creating a class and then tried to create an instance of that class but it did not show up in the intellense.  Any pointers on how to support that?

Frank

[Modified 5 years ago]

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

Hi Frank,

Right now the sample is just set up to show how to do <%= ... %> sort of blocks, which means code wrapped with a Response.Write output.  You can see in the ParentParser.Parse method how this all is done.  That method alters the output of what gets sent to the parser. 

You would need to alter that to support other styles of blocks, such as <% ... %> appropriately.  Maybe we can look into this further soon and see if we enhance it further for that sort of thing as a reference.  But it shouldn't be too hard to do so on your own.


Actipro Software Support

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

Quick update... in the upcoming 2014.2 version, we are going to be including a sample that shows both <% ... %> and <%= ... %> blocks.


Actipro Software Support

Posted 4 years ago by Frank Wisniewski
Avatar

Has there been any more work on child languages with this lastest 2016 release?  I was able to use the samples you provided 2 years ago to get it working but I am still having some issues.  For some reason, I can not get the intellisense to work as well as it does for just C#/VB.Net.  In my project with child languages (I am trying to provide an editor for T4)  things like generic collections and linq extensions do not appear in the completion list.  Any guidance or an updated sample would be great.

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

Hi Frank,

We did add an official refined sample of ASP style tags in the last year or so.  Look at the DotNetAddonServerTags QuickStart in the SyntaxEditor samples.


Actipro Software Support

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.