Hello,
I am working with the Dynamic Syntax Language XML programmatically using the DynamicSyntaxLanguage class. So far I have ran into a couple issues I wanted to get clarification on since I am new to the SyntaxEditor control.
1. Missing BracketHighlight Property in the DynamicLexicalScope class?
The SyntaxEditor help file specifies that the DynamicLexicalScope class represents the Scope tag at run-time. It shows two possible attributes AncestorEndScopeCheckEnabled and BracketHighlight.
The problem I ran into is that the BracketHighlight attribute is not defined in the DynamicLexicalScope class. Is there some other way to get/set this property?
2. Unable to add a Explicit Pattern Tag?
The SyntaxEditor Help File shows two Child Tags (ExplicitPattern & ExplicitPatterns ) for the ExplicitPatternGroup Tag. Both tags are represented at run-time by the LexicalPattern class. How can I programmatically flag a group of patterns to save separate “ExplicitPattern” tags? Adding more than one LexicalPattern to the PatternGroup changes the XML tag to ExplicitPatterns.
Example:Saved XML Output:
Desired XML Output:
Regards,
Ken Brown
I am working with the Dynamic Syntax Language XML programmatically using the DynamicSyntaxLanguage class. So far I have ran into a couple issues I wanted to get clarification on since I am new to the SyntaxEditor control.
1. Missing BracketHighlight Property in the DynamicLexicalScope class?
The SyntaxEditor help file specifies that the DynamicLexicalScope class represents the Scope tag at run-time. It shows two possible attributes AncestorEndScopeCheckEnabled and BracketHighlight.
The problem I ran into is that the BracketHighlight attribute is not defined in the DynamicLexicalScope class. Is there some other way to get/set this property?
2. Unable to add a Explicit Pattern Tag?
The SyntaxEditor Help File shows two Child Tags (ExplicitPattern & ExplicitPatterns ) for the ExplicitPatternGroup Tag. Both tags are represented at run-time by the LexicalPattern class. How can I programmatically flag a group of patterns to save separate “ExplicitPattern” tags? Adding more than one LexicalPattern to the PatternGroup changes the XML tag to ExplicitPatterns.
Example:
LexicalPatternGroup.Add(New ActiproSoftware.SyntaxEditor.Addons.Dynamic.LexicalPattern("End Function"))
LexicalPatternGroup.Add(New ActiproSoftware.SyntaxEditor.Addons.Dynamic.LexicalPattern("End Sub"))
State.LexicalPatternGroups.Add(LexicalPatternGroup)
<!-- States -->
<States>
<!-- DefaultState State -->
<State Key="DefaultState" TokenKey="DefaultToken" Style="DefaultStyle">
<!-- Pattern Groups -->
<PatternGroups>
<ExplicitPatternGroup TokenKey="Test">
<ExplicitPatterns>
End Function End Sub
</ExplicitPatterns>
</ExplicitPatternGroup>
</PatternGroups>
</State>
</States>
<!-- States -->
<States>
<!-- DefaultState State -->
<State Key="DefaultState" TokenKey="DefaultToken" Style="DefaultStyle">
<!-- Pattern Groups -->
<PatternGroups>
<ExplicitPatternGroup TokenKey="Test">
<ExplicitPattern Value="End Function" />
<ExplicitPattern Value="End Sub" />
</ExplicitPatternGroup>
</PatternGroups>
</State>
</States>
Ken Brown