Posted 14 years ago by Alex_3333
Avatar
I inserted lower code into Actipro test application (into some menu handler):

editor.SuspendLayout();
Int32 nCaretOffset = editor.Caret.Offset;
for ( Int32 nI = 0; nI < 20; nI++ )
editor.Document.AppendText( "Some_text: private void filePageSetupMenuItem_Click(object sender, System.EventArgs e)\r\n" );
editor.Caret.Offset = nCaretOffset;
editor.ResumeLayout();

Can I do something to:

1. Save caret position without document blinking? Looking about ResumeLayout() did not get anything.

2. Process each added token only one time by DefaultSemanticParser? Breakpoint in GetTokenOutliningAction() shows that for example token "Some_text" is processed some times not one. Some looking about returned range of PerformAutomaticOutlining() did not get anything.

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
1) You'll want to use Suspend/ResumePainting instead of Suspend/ResumeLayout

2) The semantic parsing occurs based on several things, the lexical parse range and the outlining node tree state. One of those things is probably causing a previous line to be semantically analyzed again.


Actipro Software Support

Posted 14 years ago by Alex_3333
Avatar
Thank you and sorry for my mistake but I am continuing <IMG SRC="smile.gif" border="0"> Is it rigth to return from DefaultSemanticParser.PerformAutomaticOutlining() as lower?

return new Range( modification.StartOffset, modification.InsertionEndOffset );

I want to be sure that all document changes will be parsed.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
At the minimum, that should be the range you get for each modification. However the outlining node state may cause a larger range to be returned.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.