DocumentModificationType

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Greg Shaffer - Boulder
Avatar
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?

-Greg

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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 14 years ago by Greg Shaffer - Boulder
Avatar
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
...
KeyUpPostParse

----------Or-----------
Explicitly call PostParse on a KeyUp.

-Greg
Posted 14 years ago by Greg Shaffer - Boulder
Avatar
BTW,

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...

-Greg
The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.