Toggle Outlining Expansion on first to last lines of outlining

SyntaxEditor for WPF Forum

Posted 7 years ago by Xinen Lee
Avatar

Hi Actipro

Currently the Toggle Outlining Expansion toggles the expansion state for the outlining node region in which the caret is in. 

1. Aabc class A {
2.     Babc class B { Cabc class C {
3.         } Cxyz
4.     } Bxyz
5. } Axyz

 

Hence in the above example..

Actual: Each class is collapsed only if the caret is within the class's {} brackets. If caret is at the beginning of line 2, class C does not collapse, but class a instead. This is not ideal since class A could be really far away. User would expect current line's node1 to be collapsed instead.

Expected: Class C should collapse as long as caret is anywhere on line 2 to 3. Class B collapses as long as caret is anywhere on line 4. This is the behavior in VS, which we find to be more useful and expected. Could this be implemented please?

Comments (7)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I'm not sure the logic VS handles all scenarios very well.  For instance, manually collapse both nodes B and C.  Then put the caret on line 2 and try to Toggle Outlining Expansion.  Nothing visibly changes.  I think VS is trying to toggle node C in that case but its hidden by node B.  That seems wrong.


Actipro Software Support

Posted 7 years ago by Xinen Lee
Avatar

That's true. Basically I expect Toggle to work the same way as if I were clicking the button manually, when the caret is in any of the lines in which the outlining region is in.. Does that make sense?

[Modified 7 years ago]

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Xinen,

Yes, for the next maintenance release we will make Toggle Outlining Expansion work the same as clicking the margin button.  On lines where there is no margin button, it will behave as before.


Actipro Software Support

Posted 7 years ago by Xinen Lee
Avatar

ok thanks!

Posted 7 years ago by Xinen Lee
Avatar

Hi Actipro,

Here's another scenario which is similar, hope your fix will address this:

/* some comments
*/ function abc() {
...  

When line 1 is collapsed:

/**/ function abc(){

With the caret in this line after the collapsed /**/ region, it does not trigger an expand as if the + toggle button was clicked.

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Xinen,

Yes they work the same now.


Actipro Software Support

Posted 7 years ago by Xinen Lee
Avatar

thanks!

The latest build of this product (v24.1.1) 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.