Posted 17 years ago by Anthony Cooper
Version: 4.0.0253
Avatar

When will Actipro be releasing a version of the .net add-on languages that support merging?

Alternatively, is there a way of quickly implementing intelli-prompt for mergeable languages?

Comments (9)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
That will take some somewhat major design enhancements because there are many different scenarios and ways that languages can merge and issues that are introduced accordingly when doing semantic parsing. This is something we may try to do for v5.0 though.

The .NET Languages Add-on will not currently work properly in a merged language scenario. If you are making a custom language, you can try and make your parser only examine tokens in your language and populate IntelliPrompt accordingly.

It would be helpful if you (and anyone else who is interested in this sort of feature) could post some specs on what you are looking for. For instance a lot of code generators have a merged language scenario where there is a template language and a code language. Please tell us about your desired scenarios for using this feature.


Actipro Software Support

Posted 16 years ago by Mohammed Al-Ashraf
Avatar
I am trying to use the SytaxEditor to write templates for code generating.
I use a template lang and scripting lang. template lang should be any thing(C#, VB, SQL, whatever).

Script lang should be a .NET lang (C#, VB)

I want a feature that enable me to add intelliPrompt for the two languages.

I can use it now if the two langauges are .NET by using the .Net Add-on, but still intelliPrompt will not work in all places in the code, is there any glue for this case?

I think it is easy to you to add those features since some code generators aleardy implemented them.

Regards.
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Mohammed,

Right now as you saw, the .NET Languages Addon won't work properly in terms of automated IntelliPrompt when in a merged scenario. This is something that we are going to try and address in the next major version of SyntaxEditor.


Actipro Software Support

Posted 16 years ago by Mohammed Al-Ashraf
Avatar
Hi,
Do you have an estimated date for the next major version?
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry not at this time... we are just starting to look into it. We posted a sticky message yesterday in the main SyntaxEditor forum though indicating if you would like to actively participate in brainstorming future parsing features, you can sign up with us. Check that out if you are interested and are willing to provide input.


Actipro Software Support

Posted 14 years ago by Gareth Hayter
Avatar
Is this capability any nearer? How can I accomplish this now?

What I'm doing at the moment, but it is a great big hack, is I have two editors, one on-screen (A) and one off-screen (B). When the trigger is activated on A, then I read the Document text from A, strip out the 'template-text' to leave the 'code', paste it into editor B, keep track of differing offsets etc, invoke the Intelliprompt magic on B, but wire up A's display-list. This means that editor B has a clean language. As you can see this is extremely sub-optimal and the entire process takes place whenever the users types a period or auto-completes a word.

Is there a more elegant way for me to accomplish this? I do have the Blueprin license for the .net Lnaguages Add-on, so I can tweak if required, it's just that I need a solution very urgently!

Thanks,
Gareth.
Posted 14 years ago by Gareth Hayter
Avatar
This gets me most of the way. You can set the code in B, then call execute this code to cause the IntelliPrompt to pop up in A. One of the remaining problems is that the selected item does not get set in A's IntelliPrompt. Any idea how to get that working?

syntaxEditor2.SelectedView.GetCurrentLanguageForContext().ShowIntelliPromptMemberList(syntaxEditor2);

if (syntaxEditor2.IntelliPrompt.MemberList.Count > 0)
{
syntaxEditor1.IntelliPrompt.MemberList.Clear();
syntaxEditor1.IntelliPrompt.MemberList.ImageList = syntaxEditor2.IntelliPrompt.MemberList.ImageList;

foreach (IntelliPromptMemberListItem item in syntaxEditor2.IntelliPrompt.MemberList)
syntaxEditor1.IntelliPrompt.MemberList.Add(item);

syntaxEditor1.IntelliPrompt.MemberList.SelectedItem = syntaxEditor2.IntelliPrompt.MemberList.SelectedItem;
syntaxEditor1.IntelliPrompt.MemberList.Show();
}
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Gareth,

The main problem right now is the token scanning in code such as where the context is being built. If you could write a wrapper around the streams used to provide tokens back that would skip over tokens from your template language, that would probably get things working.

Now let me tell you where things stand with that. Now that we got the Silverlight SyntaxEditor out, we've started listing out requirements for an updated grammar/AST model that we're going to build into our WPF and Silverlight SyntaxEditors. After that starts to take form, we want to ensure that the add-ons we create are able to properly handle multi-language scenarios. Ideally it would be easy to slap in one of our pre-defined add-on languages and have IntelliPrompt continue to work on them. That's what we're aiming for with our changes. When we get to porting over the .NET Languages Add-on we're going to be reimplementing a lot of areas in it and hope to port a number of those changes back to WinForms.

To get a member list to initialize a selection, you need to pass it a text range to an overload of its Show method.


Actipro Software Support

Posted 14 years ago by Gareth Hayter
Avatar
Thanks. I managed to get a nice solution working by modifying the source-code of the .Net Language Add-on. Having access to the source-code has saved me on a number of occasions!
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.