Posted 10 years ago by KC
Version: 4.0.0281
Avatar
I am using the DotNet addon and i have automatic outlining enabled. All the intelliprompt features seem to be working fine also. But, I am getting some odd behaviors that I can't figure out.

1) When the document is shown all the nodes are collapsed. How do i change that behavior? It actually appears as though they are expanded and then immediately collapse after I display the editor. I tried using RootNode.ExpandDescendents and that had no affect.

2) After I then manually expand any of the nodes, that node collapses whenever I start typing in the editor.

Any ideas?

Comments (7)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We've never heard of that happening. The document will collapse #region nodes by default but that is it.

It sounds like you may have set some options or changed something that is leading to this behavior. It would probably be best to repro it in a simple sample project. That way you can identify if something you are doing is causing it. If you end up thinking it's a bug in our code then you can email the project over and we can look at it.


Actipro Software Support

Posted 10 years ago by KC
Avatar
How do I stop the region nodes from collapsing, or how can I expand them?

RootNode.Expanded = true
and
RootNode.ExpandDescendents

Does not do it.
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
As we posted, it sounds like something is wrong with your setup. Please do what we asked by reproing the issue in a simple sample project and email it over so we can look at it. Thanks!


Actipro Software Support

Posted 10 years ago by KC
Avatar
So are you saying that the method Rootnode.ExpandDescendents should also expands regions?

The other features in this editor appear to be functioning. So, I'm not sure I understand how a setup issue would cause just the region nodes to not expand.

We found out why they were collapsing after we tried to manually expand them, but, we just want to know how to expand them automatically.

It would be difficult to create a single project to demo since all our class objects and dynamic code generation would have to also be reproduced in order to do that. So, I was hoping you could simply indicate if this is supposed to work or if there is another way to access the (region) nodes and expand them.
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes ExpandDescendants should recursively set each descendent node's Expanded to true.

Code in the language's OnDocumentAutomaticOutliningComplete override collapses the region outlining nodes after the semantic parse completes. If you don't want that functionality you could override that method to do nothing.

As for reproing (although you may not need to for this post), we wouldn't want all that code for a repro. We'd just want a Form with a single SyntaxEditor on it that loads whatever language you use, with its header text, text and footer text set to an example that shows the problem. No code gen involved. Hope that helps.


Actipro Software Support

Posted 10 years ago by KC
Avatar
Thanks... We had the ExpandDescendents method call in the DocumentAutomaticOutliningComplete event of the editor.

We thought that would expand the nodes when outlining was completed. It was being triggered as expected and we were not getting any errors. Should that accomplish the same thing?
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ahh, yes the language version of that handler (which is where our collapse code is) fires after the SyntaxEditor event.

You'd have to create a class that inherits the SyntaxLanguage you're using and override OnDocumentAutomaticOutliningComplete without calling the base method to handle this.


Actipro Software Support

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.