Author Topic: Code folding saving  (Read 15880 times)

Offline Manolo

  • Multiple posting newcomer
  • *
  • Posts: 47
Code folding saving
« on: August 29, 2013, 12:28:11 am »
Hello

When I reopen my project I see that some blocks of code are folded, while others are not. And it seems to me that those blocks were not the same I kept folded last time I used that project.
What I would like to know is when C:B saves the folding status (which blocks to fold) and if there's an option to save it by hand. Perhaps is it done when the file is saved? when the project is saved?

TIA
Manolo

Offline spidamoo

  • Single posting newcomer
  • *
  • Posts: 6
Re: Code folding saving
« Reply #1 on: May 19, 2014, 11:34:52 am »
I have the same issue, so i found this and some similar topics here, but none of them got any answer.
I wonder if there any logical explanation on how C::B decides which blocks to fold when it opens file.
Also it would be nice if C::B did it more obvious like when file saves or there was a way to save folding settings manually. How do I post a feature request?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code folding saving
« Reply #2 on: May 19, 2014, 10:46:51 pm »
This is the change that introduced this feature: https://github.com/obfuscated/codeblocks_sf/commit/6452d64e367676aa8b722010e68665ca25346402

In short:
1. there is an option to disable it in the settings
2. the state is saved in the layout file.
3. post exact steps to reproduce the problem of broken folding.
4. what do you mean by save settings manually?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline spidamoo

  • Single posting newcomer
  • *
  • Posts: 6
Re: Code folding saving
« Reply #3 on: May 21, 2014, 04:17:50 pm »
1. I didn't understand to disable *what*? But I don't think I need to disable *it* anyway, more like I need it to work properly.
2. When does the layout file saves? I believe it happens when I *Save project* or at least when I *Save everything*, whatever "everything" is. Do I understand this right?
3.
1) Say I folded every function block in my source file like this: http://joxi.ru/HbN8UxjKTJAeTpfRCec
2) I click *Save everything* in File menu just to be sure.
3) I exit C::B.
4) I launch C::B and reopen my workspace and see that some random blocks are unfolded while others (it seems to be only few in the beginning of the file) remain folded: http://joxi.ru/V7V8UxjKTJAuTkC8auo
4. I meant since saving source or project or workspace or whatever seems to not affect saving folding settings maybe there is (should be?) some dedicated menu item like *Save folding settings*. Actually it would be much better if folding settings were saved when corresponding source file is saved. Which I believe you intended to implement but there seems to be a bug.
« Last Edit: May 21, 2014, 04:21:45 pm by spidamoo »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code folding saving
« Reply #4 on: May 21, 2014, 05:06:34 pm »
Does this happen with a new simple hello world type of project?

p.s. There is no option, I've been misled by the commit, so this fold saving is always enabled.
« Last Edit: May 21, 2014, 05:08:47 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline spidamoo

  • Single posting newcomer
  • *
  • Posts: 6
Re: Code folding saving
« Reply #5 on: May 21, 2014, 10:08:47 pm »
Yes, it does.
I tried to create a new project using the Console application template. Then i folded the main() function and closed C::B.
After restarting main() block was unfolded. I also tried adding some other (empty) function blocks, changed some project settings so that C::B would ask me if project needs to be saved (to be sure project saving occurs). Nothing helped, I actually haven't managed to get any block folded at the time project is reopened.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code folding saving
« Reply #6 on: May 22, 2014, 12:36:27 am »
It seems that it fails during loading of the layout file. The saving works as expected, but the loading code files.

The problem happens in this file: Editor::FoldLine (deep in scintilla).
It would be very helpful if you can try to find which is the last working nightly build.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline spidamoo

  • Single posting newcomer
  • *
  • Posts: 6
Re: Code folding saving
« Reply #7 on: June 03, 2014, 11:03:37 pm »
Sorry for the long silence, I couldn't find time and will to dig through nightlies for a while =)
But now when I did, there seems to be a problem: links to builds older than December 13 (which is current stable build afaik) are all outdated.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code folding saving
« Reply #8 on: June 04, 2014, 09:45:39 am »
Here you can find all available night builds: http://developer.berlios.de/project/showfiles.php?group_id=5358 (scroll to the bottom)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline spidamoo

  • Single posting newcomer
  • *
  • Posts: 6
Re: Code folding saving
« Reply #9 on: July 06, 2014, 12:30:46 am »
Sorry again, maybe I'm late, but no, you can't. It redirects to the index page (http://www.berlios.de/)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code folding saving
« Reply #10 on: July 06, 2014, 01:01:58 am »
Yes the berlios.de has closed.
You can check here https://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/

@dev: Can you add me as dev in the sf.net and also mark 13.12 as the latest release?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Code folding saving
« Reply #11 on: July 07, 2014, 07:24:49 am »
@dev: Can you add me as dev in the sf.net and also mark 13.12 as the latest release?
You are a dev since ages there, probably the name is wrong? What is your SF login?

And I don't see a way to flag (multiple) files or folders as release.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code folding saving
« Reply #12 on: July 07, 2014, 09:45:30 am »
fuscated, but probably you're correct and probably I need admin rights to change stuff there.
Currently the default download button proposes a 12.11 release for me.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re:
« Reply #13 on: July 07, 2014, 10:57:58 pm »
Well I see the 13.12 "no setup" version. Is this a probably cookie based "intelligent" voodoo SF stuff?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Code folding saving
« Reply #14 on: July 07, 2014, 11:09:38 pm »
Well I see the 13.12 "no setup" version. Is this a probably cookie based "intelligent" voodoo SF stuff?
it seems so: I see 12.11-1_i386-debian-stab.... on my linux mint 15 machine

greetings