Delete virtual folder "src"

CodeLite installation/troubleshooting forum
TrustSeg
CodeLite Curious
Posts: 7
Joined: Tue May 24, 2016 4:35 am
Genuine User: Yes
IDE Question: C++
Contact:

Delete virtual folder "src"

Post by TrustSeg »

Using: CodeLite v9.1.7

If I create a new C++ console project, CodeLite creates two files (main.cpp & test.project) in the project dir (e. g. C:\myworkspace\testproject\). But in the Workspace View in the IDE, the structure looks like this:

Code: Select all

myworkspace
|-testproject
   |- src
      |- main.cpp
The "src" is a virtual folder, which does not exist as real folder on disk. If I create a new virtual folder under the "src" virtual folder and check the option to create a real folder on disk, CodeLite not only adds the new folder name, but also the "src" too and I cannot change this, because the text field is read-only. So if my project dir is "C:\myworkspace\testproject\" and I right-click on the "src" virtual folder in the Workspace View -> New Virtual Folder, enter for example the name "classes" and check the checkbox, CodeLite wants to create the real folder "C:\myworkspace\testproject\src\classes" (with the "src" subfolder before). Why? Like I said, I cannot change this, since the text field for the path is read-only.

To create the real folder "classes" on the disk directly inside the project dir (so it would be "C:\myworkspace\testproject\classes"), I have to create the virtual folder by right-click on the project entry ("testproject", which is the parent entry of the "src" entry), so it looks like this in the Workspace View:

Code: Select all

myworkspace
|-testproject
   |- classes
   |- src
      |- main.cpp
It is confusing to have the real folders on the same level as the special "src" virtual folder, which does not represent a real folder but actually points to the project dir (one level above).

Looking at the structure in the Workspace View, one would expect to have the files and folders on disk like this:

Code: Select all

C:\myworkspace\testproject\classes\
C:\myworkspace\testproject\src\main.cpp
But they are actually:

Code: Select all

C:\myworkspace\testproject\classes\
C:\myworkspace\testproject\main.cpp
I cannot even move the main.cpp entry from that special "src" virtual folder one level up to make it correspond to the real file structure on disk. :?

I think it would make more sense, if the Workspace View in CodeLite would show the structure the same way, as it is on disk (and especially wouldn't use that strange "src" virtual folder), like this:

Code: Select all

myworkspace
|-testproject
   |- classes
   |- main.cpp
Can this be changed or do I miss something?
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Delete virtual folder "src"

Post by eranif »

Why don't you simply remove the 'src' folder and start your way from there? (the file 'main.cpp' that it comes with usually contains a 4 lines of code...)

The 'src' folder (which is generated by the new project wizard is virtual and this can not be changed)

Eran
Make sure you have read the HOW TO POST thread
TrustSeg
CodeLite Curious
Posts: 7
Joined: Tue May 24, 2016 4:35 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Delete virtual folder "src"

Post by TrustSeg »

eranif wrote:Why don't you simply remove the 'src' folder and start your way from there?
Yes, but that's not the problem. I don't know how to move the initial main.cpp file into one of the new sub virtual (and real) folders, which I create afterwards. Not even with the "Reconcile Project..." command. It just stays in the main project directory. I just want to have the same structure in the Workspace View in the IDE like on disk.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Delete virtual folder "src"

Post by eranif »

Like I said - this file contains 4 lines of code, just delete them and recreate it...

Eran
Make sure you have read the HOW TO POST thread
TrustSeg
CodeLite Curious
Posts: 7
Joined: Tue May 24, 2016 4:35 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Delete virtual folder "src"

Post by TrustSeg »

Ok, thanks.

Just one last question: Is it possible to move one file from one folder to another (also on disk I mean) without manually deleting and creating it? If I drag and drop files in CodeLite, they are not really moved on the disk too.
Post Reply