Improving "import files from directory" feature

General questions regarding the usage of CodeLite
hbr_in
CodeLite Expert
Posts: 113
Joined: Fri Jul 11, 2008 9:12 am
Contact:

Improving "import files from directory" feature

Post by hbr_in »

Hi,

Is it possible to sort the files imported using "import files from directory" feature. Auto-create sub-virtual folders Src, headers, others & move files according to respective extension.

At present importing creates a folder named on the folder that is being imported and files are moved there. No Sorting.

So is it possible to to provide auto-sorting. Atleast inside the virtual folder

TIA

Regards
Gururaja
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Improving "import files from directory" feature

Post by eranif »

You only descrived half of the feature.

Import file works as follow:

Assuming you have the following directory layout:

Code: Select all

dir_to_import/
     |
     +---file1.cpp
     +---file2.cpp
     +---src/
              |
              +----file3.cpp
              +----file4.cpp
     +---file1.h
     +---file2.h
Now, you choose to import this directory 'dir_to_import'
Since CodeLite does not allow placing files directly under the project node, but only under virtual folder, it will create a virtual folder with the name of the project and will place under it: file1.cpp, file2.cpp, file1.h and file2.h
another virtual directory name 'src' will be created and the files file3.cpp and file4.cpp will be placed under it.

So the project layout will now look like this:

Code: Select all

Project: dir_to_import/
     +---dir_to_import/
            |
            +---file1.cpp
            +---file2.cpp
            +---file1.h
            +---file2.h
     +---src/
            |
            +----file3.cpp
            +----file4.cpp
The idea was to copy files as they look on the disk, without adding any extra virtual folders (unless necessary).
If you want to add more virtual folders - right click and add them.
Eran
Make sure you have read the HOW TO POST thread
hbr_in
CodeLite Expert
Posts: 113
Joined: Fri Jul 11, 2008 9:12 am
Contact:

Re: Improving "import files from directory" feature

Post by hbr_in »

Hi,

I think i couldnt explain my request.

Codelite at present imports all files properly. What i requested is what happens after that

Import is fine. But is it possible to sort the folder further as src & headers as below. Suggest a small addon to make
1. View as on disk

Project: dir_to_import/
+---dir_to_import/
|
+---file1.cpp
+---file2.cpp
+---file1.h
+---file2.h

2. View as per File Types
Project: dir_to_import/
+---dir_to_import/
|
+--src
| |
| +---file1.cpp
| +---file2.cpp
|
+--Headers
| |
| +---file1.h
| +---file2.h
|
+--Others

This could be sources, Headers, Make Files, Others, Asm Files Etc as per your convienience

Sorry if asking too much

TIA

Regards
Gururaja
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Improving "import files from directory" feature

Post by eranif »

I understand what you want, what I am saying that this is not the design of that feature. This features tries to copy the directory structure without adding any filters of its own - unlesses needed (like in the case i described above, when files are placed directly under the root node)

What if the users, already defined its own 'include' and 'src' dir on the disk (like myself and many other people I know of)
In that case, the directory structure will look a bit wierd:

src/
+--src/

include/
+--headers/

I truly think that CodeLite should not do this, but if you think otherwise, please submit another feature request for this.

Eran
Make sure you have read the HOW TO POST thread
Post Reply