Can you mix language definitions?

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Charles W. Hooks
I have an XML language definition that is working very well for highlighting. However, I need to capture the trigger event in order to provide the correct intelliSense for my JavaScript objects. I can not find a way to use that event unless I make a DynamicOutliningSyntaxLanguage object. This would seem to create a conflict between getting the language from Document.LoadLanguageFromXml or Document.language. Am I missing an obvious way to set an event handler for triggers on XML language definitions?

Comments (3)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Charles,

SyntaxEditor.TriggerActivated fires whenever a trigger event occurs. Also SyntaxLanguage has a virtual OnSyntaxEditorTriggerActivated method. Does one of those help you out?

Actipro Software Support

Posted 18 years ago by Charles W. Hooks
I've created an dynamic langauge object:
public class KaliScriptDynamicSyntaxLanguage : DynamicOutliningSyntaxLanguage {

I pass in extra contextual information about some instance objects available for the Java Script editor and some memberList information for them to this object.

When I use the following, I do not get any benefit from the language XML file I built I can't can't figure out how to load the XML file into the language object.
kaliScriptEditor.Document.language = kailLang;

When I use:
kaliScriptEditor.Document.LoadLanguageFromXml(getStreamFromString(langDoc.InnerXml), 0);

I am able to link the XML to my langauge object (using SyntaxLanguageTypeName), but I don't get to create that object with my java script context object with all the member list information.

I just need to know the method for loading the XML def into my KaliLang object and I should be rockin.
Posted 18 years ago by Charles W. Hooks
Doh! Just noticed the static initializer LoadFromXml on DynamicOutliningSyntaxLanguage. This should solve my problem nicely.
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.