Author Topic: New folding features...  (Read 8406 times)

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
New folding features...
« on: December 18, 2006, 03:40:03 pm »
From the 3380 revision (i think so) C::B started to fold top blocks AND sub-blocks. That's a little annoying!
Everytime you want to see the content of a function, you have to expand all the blocks.
At the same time when you press f12 to fold/unfold a block, the subfold where the caret is is folded (well, you espect the top block to be folded, since its + sign to collapse it might be hidden...)
And the last one, when there's an error, only the block where the error line is is unfolded: see the screenshot

Is this feature wanted? All the post i've read about folding didn't have anything to do with this feature...

[attachment deleted by admin]
« Last Edit: December 19, 2006, 10:09:52 am by kkez »

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: New folding features...
« Reply #1 on: December 19, 2006, 06:36:33 am »
Can you file bug report at BerliOS... Will look into it!

[EDIT] Please remember to add as much detail as possible ... (Think I have seen this bug) Have not started with this one yet... will make this and folded code deletion a priority!
« Last Edit: December 19, 2006, 06:42:10 am by joubertdj »

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: New folding features...
« Reply #2 on: December 19, 2006, 09:07:52 am »
Uploaded a patch that ensures the when the compiler marks a line as error/warning, or when it searches for something, that it will first unfold all of the parent fold then mark the line.  :)

Patch number: 001740

http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1740&group_id=5358

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: New folding features...
« Reply #3 on: December 19, 2006, 10:49:29 am »
Uploaded a patch that ensures the when the compiler marks a line as error/warning, or when it searches for something, that it will first unfold all of the parent fold then mark the line.  :)

Patch number: 001740

http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1740&group_id=5358
Thank you very much.

Quote from: kkez
....fold top blocks AND sub-blocks....
If i'm not asking too much :) (aren't you the one who implemented this feature?), it's possible to have an option to fold only the top blocks and not the sub-blocks? Or an option to specify how deep the recursion to search for blocks should go? That would be the best...

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: New folding features...
« Reply #4 on: December 19, 2006, 12:58:52 pm »
Quote
...Or an option to specify how deep the recursion to search for blocks should go...

This is obviously possible... but becomes a bit tricky when Scintilla doesn't want to play along... Usually fold ALL means to fold ALL...  :)

Hmm... I will see what the other devs says about this...
Do a feature request on BerliOS so that this can be tracked please!
PS. The patch was updated recenlty to ensure that unfolding blocks/goto's work correctly...

Quote
...If i'm not asking too much Smile...
No you are not... a previous bug post asked that all of the folds should be folded when the Fold All option is used...
« Last Edit: December 19, 2006, 03:01:25 pm by joubertdj »

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: New folding features...
« Reply #5 on: December 20, 2006, 12:09:10 pm »
Quote
This is obviously possible... but becomes a bit tricky when Scintilla doesn't want to play along... Usually fold ALL means to fold ALL...
Well, it worked before, why shouldn't it work now? I'm talking about the feature where only the top blocks are folded. I'd be happy with that too. That is, an option to choose between topblocks and topblocks/subblocks fold.

Quote
PS. The patch was updated recenlty to ensure that unfolding blocks/goto's work correctly...
I saw the updated patch. Why did you do all those changes to spaces? It makes the patch really big and without reason. And they were fine before, imho.  :) The wiki coding style article says:
Quote
Code indentation should be 4 spaces.

PS: if you can point me to the file and lines were the changes have been made, i can try to make a patch to fulfill my needs...

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: New folding features...
« Reply #6 on: December 21, 2006, 06:37:59 am »
 :oops: Yeah, I got so carried away... then I used AStyle plugin to ensure that I don't screw up too much... :)

The part that got changed for top level sub level is in DoFoldLine procedure... it is supposed to be commented...

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: New folding features...
« Reply #7 on: January 07, 2007, 04:32:15 pm »
 :D Patch uploaded to add support for the selection of Top-Level Sub-Level or both when doing a Fold All option.
Be aware that because I am using wxSmith, the changes to the xrc file is huge instead of the 6 components that I added it changed everything through SVN... sorry about that... still learning the wxSmith tool! Hope it helps!

Patch Nr: ??????

Ah #%^$%&* BerlioOS is giving me headaches again... file attached... will upload when I am able!

[EDIT] Patch Nr: #1810
[EDIT] http://developer.berlios.de/patch/?func=detailpatch&patch_id=1810&group_id=5358

[attachment deleted by admin]
« Last Edit: January 08, 2007, 12:45:19 pm by joubertdj »

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: New folding features...
« Reply #8 on: January 08, 2007, 11:35:56 am »
Let me try it. Thank you very much.

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: New folding features...
« Reply #9 on: January 08, 2007, 12:49:46 pm »
Works like a charm :) :) :) Thanks again.

Berlios has been down for ages... i submitted your patch for the "recursive unfold on error" (thanks again for that too :) ) without all those space changes, but we will never see it again, it's lost in the 403 forbidden land. So i attached it to this post :)

Hey, maybe this is a sign to make CB go back on SourceForge...

[attachment deleted by admin]

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: New folding features...
« Reply #10 on: January 08, 2007, 12:51:31 pm »
[EDIT] http://developer.berlios.de/patch/?func=detailpatch&patch_id=1810&group_id=5358

How did you put that online? I keep getting 403 forbidden both with http and https...

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: New folding features...
« Reply #11 on: January 08, 2007, 12:53:26 pm »
Someone else gave me the one where I did not use the AStyle (Or was it you?), and I uploaded it, it is supposed to be correct, the unfold recursive one... without that trigger happy AStyle  :lol:

Quote
How did you put that online? I keep getting 403 forbidden both with http and https...
I am not sure... It gave me alot of errors and suddenly it worked...  :? Have no Idea...

Offline kai

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: New folding features...
« Reply #12 on: January 08, 2007, 01:48:12 pm »

Talking about folding. Does anyone use "Toggle all folds"? I would prefer a function that toggles between Fold all and Unfold all - at least additionally (well, i would assign it to shift-f12 then :) ).

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: New folding features...
« Reply #13 on: January 09, 2007, 10:36:41 am »

Talking about folding. Does anyone use "Toggle all folds"? I would prefer a function that toggles between Fold all and Unfold all - at least additionally (well, i would assign it to shift-f12 then :) ).
What? Toggle all folds means
1) if blocks are folded, unfold them all (Unfold all)
2) if blocks are unfolded, fold them all (Fold all)

So "Toggle all folds" is the "function that toggles between Fold all and Unfold all"... you also have the two separate options (Fold all and Unfold all) just above the "Toggle all folds" menu item.

Offline kai

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: New folding features...
« Reply #14 on: January 09, 2007, 01:41:31 pm »

No, that was what I expected but it doesn't do that. It really toggles all folds - which means:

On an unfold source file, fold one method. then press shift-f12 for toggle all folds. all methods are fold except for the method you have fold before - that one is unfolded.