Posted 19 years ago by Carl Gilbert

I am using a custom parser so I can override GetTokenOutliningAction. I am loading script back into the editor and using the SemanticParseData in each token to determine where to start and end the outlining. However, the GetTokenOutliningAction sub is not called until I hit return after loading the editor.
Note: I am loading the script back into the editor by calling editor.Document.Text = myScript then then going through the tokens setting the SemanticParseData on each token.

Is there anyway to GetTokenOutliningAction to run without the user having to do anything after the editor had loaded up?

Also, is there anyway to automatically collapse an outlining region when the start and end has been located? This isn't that important however as I think it could be more annoying than anything else as I think my code keeps moving the end node as tokens are inserted.

Cheers, Carl Gilbert

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Carl,

Actually it will fire whenever the document text is modified at all, even at initial load. Otherwise outlining would never occur on initial load. Are you sure you have the language and semantic parser installed on the document before setting its text for the initial load?

Also, check out our SemanticCSharpParser class in the sample project. Look at what we did in the PostParse method. That code collapses #region nodes when the document is first loaded.

Actipro Software Support

The latest build of this product (v24.1.0) was released 5 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.