Page 1 of 1

Sourceview shows only flat hierarchy

Posted: Wed Sep 16, 2015 10:50 am
by sparhawk
I'm new to Codelite and I was wondering if it is possible to have the sources viewd in a hierarchical view. I know that I can create virtual folders, but my project is created with CMake and creating those is not really helpfull.

Re: Sourceview shows only flat hierarchy

Posted: Wed Sep 16, 2015 11:05 am
by eranif
If you are using CMake with version 3.0.X and later, you can generate CodeLite workspace using CMake which will fit your CMakeLists.txt file(s):

Code: Select all

Generators

The following generators are available on this platform:
  Unix Makefiles              = Generates standard UNIX makefiles.
  Ninja                       = Generates build.ninja files (experimental).
  CodeBlocks - Ninja          = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
  CodeLite - Ninja            = Generates CodeLite project files.
  CodeLite - Unix Makefiles   = Generates CodeLite project files.
  Eclipse CDT4 - Ninja        = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles
                              = Generates Eclipse CDT 4.0 project files.
  KDevelop3                   = Generates KDevelop 3 project files.
  KDevelop3 - Unix Makefiles  = Generates KDevelop 3 project files.
  Kate - Ninja                = Generates Kate project files.
  Kate - Unix Makefiles       = Generates Kate project files.
  Sublime Text 2 - Ninja      = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                              = Generates Sublime Text 2 project files.
OR you can always create a single empty project and then using the context menu:
"Import files from directory" - and CodeLite will import all your source files while keeping the directory structure you have on the file system

Eran

Re: Sourceview shows only flat hierarchy

Posted: Wed Sep 16, 2015 3:47 pm
by sparhawk
eranif wrote:If you are using CMake with version 3.0.X and later, you can generate CodeLite workspace using CMake which will fit your CMakeLists.txt file(s)OR you can always
The workspace was created by CMake, as I use 3.8 and I noticed that CodeLite is supported. B ut the view is still not hierarchical, so maybe I do something wrong? Do I have to give some additional options?
create a single empty project and then using the context menu:
"Import files from directory" - and CodeLite will import all your source files while keeping the directory structure you have on the file system
Thanks. In this case this is not an option though, because I would loose all the settings applied by CMake. :)

Re: Sourceview shows only flat hierarchy

Posted: Wed Sep 16, 2015 4:14 pm
by eranif
sparhawk wrote:In this case this is not an option though, because I would loose all the settings applied by CMake.
Not really... this is where custom makefile project are very handy:

http://codelite.org/LiteEditor/CustomMakefiles#toc3

In fact, this is how I develop CodeLite on Linux and OSX
Eran

Re: Sourceview shows only flat hierarchy

Posted: Thu Sep 17, 2015 11:47 am
by sparhawk
Thanks, it works now. :) Now I only have to find out how to specify the executable for debugging. :)

Edit: Debugging now also works. Nice. :)