SyntaxEditor for Windows Forms Forum

Posted 16 years ago by Greg Shaffer - Boulder
Here's a possible improvement for the semantic parser:

For the DocumentModificationType, I think it would be better if there was a TypingComplete type, as opposed to just a Typing type.

I really only need to set/modify my token's ISemanticParseData after the user has performed a keyup. If the user holds down a key, I don't want to execute code every time a character gets added to my document.

I can manage this myself, but it seems useful in the PostParse function.

Is there another mechanism from within PostParse?


Comments (3)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Greg,

The problem is that the document modification occurs from the SyntaxEditor's KeyPress event. So KeyUp doesn't happen until after the modification already occurred. Any suggestions?

Actipro Software Support

Posted 16 years ago by Greg Shaffer - Boulder
Yep I was running into that as well.

Maybe the specific modification doesn't matter in this case, so maybe a new function, like "KeyUpPostParse(Document doc)" would work.

Or, you could cache the last modification and pass that as well.

"KeyUpPostParse(Document doc, DocMod lastMod):

Order of calls:

KeyPress on Editor
PreParse -> Rename to PreLexicalParse?
PostParse -> Rename to PostLexicalParse?
KeyUp on Editor

Explicitly call PostParse on a KeyUp.

Posted 16 years ago by Greg Shaffer - Boulder

This goes under the category of "It would be nice if..."

Really, I should make my semantic parsing a little better so I don't have to worry about this feature.

Just an idea...

The latest build of this product (v2020.1 build 0402) 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.