[Feature Request] Virtual Folders for Projects

Discussion about CodeLite development process and patches
Yaakuro
CodeLite Enthusiast
Posts: 30
Joined: Sat Oct 04, 2008 4:06 am
Contact:

[Feature Request] Virtual Folders for Projects

Post by Yaakuro » Thu Sep 15, 2016 12:13 pm

Hi Eranif

I like to know if you ever (or others) considered Virtual Folders for projects? Let's say I have 15 projects in my Workspace. Wouldn't it be nice to be able to put some projects into sub project folders? What do you think how much effort that needs to do so and which files are important to get in touch to start?

Yaakuro

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

Re: [Feature Request] Virtual Folders for Projects

Post by eranif » Thu Sep 15, 2016 3:42 pm

I never considered that, I know that VS supports it.
I assume here that you are talking about a virtual folder for the workspace level (i.e. the virtual folders are children of the workspace and may contain projects)
To start implementing this, you should look at Plugin/workspace.cpp and Plugin/project.cpp
Make sure you have read the HOW TO POST thread

Yaakuro
CodeLite Enthusiast
Posts: 30
Joined: Sat Oct 04, 2008 4:06 am
Contact:

Re: [Feature Request] Virtual Folders for Projects

Post by Yaakuro » Fri Sep 16, 2016 5:16 am

Yes, virtual folder in the workspace level. So would that be interesting to have? It would help to organize projects visually a bit more.
You have any suggestion how to keep the workspace backwards compatible? Let's say if CodeLite 9.3 would support it but if one opens the workspace file with older version of CodeLite?

Yaakuro

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

Re: [Feature Request] Virtual Folders for Projects

Post by eranif » Fri Sep 16, 2016 9:03 am

Yaakuro wrote:So would that be interesting to have?
Yes and it will
Yaakuro wrote:You have any suggestion how to keep the workspace backwards compatible?
We can't. If a CodeLite without this feature will attempt to open a workspace with virtual folders - it will ignore them and will load only projects which are a direct children of the workspace
Make sure you have read the HOW TO POST thread

Jarod42
CodeLite Expert
Posts: 176
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: [Feature Request] Virtual Folders for Projects

Post by Jarod42 » Fri Sep 16, 2016 3:46 pm

As I understand,
instead of creating project in a virtual folder child (in config),
adding a new properties link to the virtual folder would allow old codelite to open it.

so instead of natural:

Code: Select all

<workspace>
  <VirtualFolder>
     <project> </project>
     //...
  </VirtualFolder>
  <project> </project> // Normal project
  // ..
<workspace>
you may do

Code: Select all

<workspace>
  <VirtualFolder></VirtualFolder>
  <project InsideVirtualFolder="virtualForderIdOrName" > </project>
  <project> </project> // Normal project
  // ..
<workspace>

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

Re: [Feature Request] Virtual Folders for Projects

Post by eranif » Fri Sep 16, 2016 6:38 pm

Jarod42 wrote:As I understand,
instead of creating project in a virtual folder child (in config),
adding a new properties link to the virtual folder would allow old codelite to open it.
Great idea :)
Make sure you have read the HOW TO POST thread

Yaakuro
CodeLite Enthusiast
Posts: 30
Joined: Sat Oct 04, 2008 4:06 am
Contact:

Re: [Feature Request] Virtual Folders for Projects

Post by Yaakuro » Sat Sep 17, 2016 7:32 pm

How complicated is this? Is it possible to add this feature to next release of CodeLite?

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

Re: [Feature Request] Virtual Folders for Projects

Post by eranif » Sat Sep 17, 2016 9:34 pm

Please post a feature request on GitHub
Not *that* complicated...
but there is definitely some work
Make sure you have read the HOW TO POST thread

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

Re: [Feature Request] Virtual Folders for Projects

Post by eranif » Tue Oct 25, 2016 7:15 pm

I started working on this and it appears to be more complicated as I first thought it would be :P
instead of creating project in a virtual folder child (in config),
adding a new properties link to the virtual folder would allow old codelite to open it
This approach can not work with the expected user flow:
  • User right click on the workspace or on a workspace folder and selects "New Folder"
  • Right click on the "Workspace Virtual Folder" brings a context menu with various options such as "Create new project"
The above is what I consider an intuitive flow, it also means that a folder should be able to exists without any projects attached to it.
So there is no way of avoiding it, but this means that an older versions of CodeLite will not be able to open a workspace that contains their projects inside a virtual folder.

A possible solution to allow users with different versions of CodeLite to work is to provide some kind of an export mechanism
Make sure you have read the HOW TO POST thread

Jarod42
CodeLite Expert
Posts: 176
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: [Feature Request] Virtual Folders for Projects

Post by Jarod42 » Thu Nov 10, 2016 4:49 am

An other possibility would be to have an extra separated entry to manage the hierarchy...

Post Reply