Posted 20 years ago
by Blaise

Hi,
Thanks for a very cool product!
I'm using v3.0.0177 of the SyntaxEditor and have noticed both a minor bug and an "anomaly" of the Text property of the OutliningNode. I also have a suggestion.
The anomaly is that the text returned by the Text property begins with the node's key word (e.g., "Sub" or "Function"). I would have thought that the Text of the outlining node would have begun at the start of the line on which the token is found. So, in this example:The first 20 characters of the line ( Private ReadOnly ) are not included in the node's Text property. Please consider changing this behavior so that the node starts at the beginning of the line.
The bug is that the last charater of the Text property is missing. That is, the example above might end like so:But the last characters of the Text property are " End Functio"
My goal is to emulate VB.Net's code windows, that have two combo controls at the top of the form for entity (on the left) and routine name (on the right). Not only do I have to populate the combos, but when the caret moves, I have to figure out what routine of which entity the caret is in (so I can display the proper entries in the combos).
I was thinking that since outlining nodes are created as the code is parsed by SE, I can readily accomplish these goals by traversing the outline nodes (to populate the combos), and using the caret position and the node FindRecursive method (to find out which routine the caret is in).
The only issue is to figure out what action of the user will invoke a refresh of the combos (open to suggestion here - perhaps some logic in PostParse?).
My suggestion: an OutliningNode.Identifier property (or perhaps Name). All outlining node key words are followed by an identifier (the name of the Sub, Function, Interface, etc. of the outline node). It would be very handy for a node to have this identifier as a property (instead of having to go look for it). The only exception is a "#Region", but this has a quoted string "label" which could certainly be set as the Identifier (or Name) property.
Thanks!
[Modified at 06/15/2005 08:44 PM]
Thanks for a very cool product!
I'm using v3.0.0177 of the SyntaxEditor and have noticed both a minor bug and an "anomaly" of the Text property of the OutliningNode. I also have a suggestion.
The anomaly is that the text returned by the Text property begins with the node's key word (e.g., "Sub" or "Function"). I would have thought that the Text of the outlining node would have begun at the start of the line on which the token is found. So, in this example:
Private ReadOnly Function Foo() As Boolean
The bug is that the last charater of the Text property is missing. That is, the example above might end like so:
End Function
My goal is to emulate VB.Net's code windows, that have two combo controls at the top of the form for entity (on the left) and routine name (on the right). Not only do I have to populate the combos, but when the caret moves, I have to figure out what routine of which entity the caret is in (so I can display the proper entries in the combos).
I was thinking that since outlining nodes are created as the code is parsed by SE, I can readily accomplish these goals by traversing the outline nodes (to populate the combos), and using the caret position and the node FindRecursive method (to find out which routine the caret is in).
The only issue is to figure out what action of the user will invoke a refresh of the combos (open to suggestion here - perhaps some logic in PostParse?).
My suggestion: an OutliningNode.Identifier property (or perhaps Name). All outlining node key words are followed by an identifier (the name of the Sub, Function, Interface, etc. of the outline node). It would be very handy for a node to have this identifier as a property (instead of having to go look for it). The only exception is a "#Region", but this has a quoted string "label" which could certainly be set as the Identifier (or Name) property.
Thanks!
[Modified at 06/15/2005 08:44 PM]