News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Bug encountered while opening a Code::blocks project ?? [ Resolved ]

Started by Ghostwhowalks, January 29, 2010, 06:20:19 AM

Previous topic - Next topic

Ghostwhowalks

I'm not sure if this bug has been reported. I have created a Code-blocks project with three files:  main1.h, main2.h and main.cpp. The project compiles and I can run a console application built with those files. I have saved the project and exited Codeblocks. Now, when I reopen the project , The IDE/editor loads only main.cpp and I have to open the other files manually even though all those files belonged to one project. I wanted to know if it is possible to see/open all source files related to a project when a user opens a project file. If this is a bug, can you please fix it in your next Codeblocks release?

Thanks,
AM

MortenMacFly

Quote from: Ghostwhowalks on January 29, 2010, 06:20:19 AM
I wanted to know if it is possible to see/open all source files related to a project when a user opens a project file. If this is a bug, can you please fix it in your next Codeblocks release?
This is surely not a bug. Code::Blocks opens the files as layout in the last session if you have enabled the option accordingly:
Settings -> Environment -> General settings -> Group "On project load" -> "Open all project files" OR "Open last open files".

Make sure you choose the right options. If e.g. working with a big project (Linux kernel sources) the first option will lead to the fact that you can grab a coffee while the IDE opens several 10000 files for you. Not sure if this would work at all. So be careful.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: Ghostwhowalks on January 29, 2010, 06:20:19 AM
I'm not sure if this bug has been reported. I have created a Code-blocks project with three files:  main1.h, main2.h and main.cpp. The project compiles and I can run a console application built with those files. I have saved the project and exited Codeblocks. Now, when I reopen the project , The IDE/editor loads only main.cpp and I have to open the other files manually even though all those files belonged to one project. I wanted to know if it is possible to see/open all source files related to a project when a user opens a project file. If this is a bug, can you please fix it in your next Codeblocks release?

Thanks,
AM

Please have a look at "Settings -> Environment -> General settings -> On project load:".

By the way, you forgot to tell us which version of C::B and which OS (and version) you use. This might be needed.

Jenna

Quote from: MortenMacFly on January 29, 2010, 07:02:57 AM
Make sure you choose the right options. If e.g. working with a big project (Linux kernel sources) the first option will lead to the fact that you can grab a coffee while the IDE opens several 10000 files for you. Not sure if this would work at all. So be careful.

It works, I use the kernel-sources to test opening very much files in C::B.  :D

MortenMacFly

Quote from: jens on January 29, 2010, 07:10:53 AM
It works, I use the kernel-sources to test opening very much files in C::B.  :D
So... just for the record: How long does it take (for how many files)?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

Quote from: MortenMacFly on January 29, 2010, 07:02:57 AM
Make sure you choose the right options. If e.g. working with a big project (Linux kernel sources) the first option will lead to the fact that you can grab a coffee while the IDE opens several 10000 files for you. Not sure if this would work at all. So be careful.

This option could be transformed to "Open the last N files", so accidents are avoided :)

Also I've thought of an option to auto close a file that is not used for 10min and there are more than 10 open files, but I'm not sure if that would be useful. Can this be done with a plugin or I need to modify the SDK/app code?
(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!]

MortenMacFly

Quote from: oBFusCATed on January 29, 2010, 09:49:27 AM
Can this be done with a plugin or I need to modify the SDK/app code?
A plugin can do. Check the autosave plugin. And/or even adapt it.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: MortenMacFly on January 29, 2010, 07:30:11 AM
Quote from: jens on January 29, 2010, 07:10:53 AM
It works, I use the kernel-sources to test opening very much files in C::B.  :D
So... just for the record: How long does it take (for how many files)?

Sorry for the misinformation, I thought I used it to open all files, but now I'm sure I only used it to measure the time it took to open and parse a very large project (> 21000 files).
Yesterday I started to open the kernel-project and let C::B open all files. This runs now since about 24 hours but is not ready, I am not sure about the amount of files that is opened now (more than the half of all surely), but it's definitely absolutely unusable.