Author Topic: Is there a way to specifiy a 'root' folder for a project?  (Read 2806 times)

mwb1100

  • Senior Community Member
  • Posts: 145
  • Hero Points: 13
Is there a way to specifiy a 'root' folder for a project?
« on: August 25, 2015, 06:05:48 pm »
I place my workspace and projects files in a dedicated directory so they don't end up in the source tree.

However, this causes the project's "Directory view" to be relative to the directory where the .vpj file is and display of the filename often become much longer than they really need to be. For example, this forces me to have to scroll the Project window horizontally more than I like.

Is there a way that I can tell SE to keep the .vpj file in one location but display filenames trees starting from some other location?  I was hoping that maybe setting the project's "Working directory" might do the trick, but no such luck.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5790
  • Hero Points: 461
Re: Is there a way to specifiy a 'root' folder for a project?
« Reply #1 on: August 26, 2015, 02:19:41 am »
At the moment, there isn't a way to specify a root directory for files. This definitely would be a useful feature. There is a partial work around. If you use "Custom View" and add a tree of files with "Add as wildcard" checked, the start path doesn't take up any space. Using wildcards like this has advantages and disadvantages. Wildcard file lists can more easily be updated. static file lists are more reliable if you are using SlickEdit projects to build your source. I like static recursive file lists better because you can get better performance (and I'm a performance nut).

With SlickEdit 2015 (not in beta yet), "Custom View"  has been enhanced to support automatically creating a folder for each directory when recursing a static list of files. This essentially makes "Custom View" more powerful than "Directory View" (although Directory View is very convenient). Using the Project tool window (not Project Properties), just create any folder in Custom View. Then use (Add>Tree) to add a recursive list of files starting at a particular path, check "Recursive", and check the new "Create subfolders" check box. This combination gives you some pretty powerful control over your folders and displaying recursive directory trees.

mwb1100

  • Senior Community Member
  • Posts: 145
  • Hero Points: 13
Re: Is there a way to specifiy a 'root' folder for a project?
« Reply #2 on: August 26, 2015, 11:46:51 pm »
The  "Custom View" with a tree of files with "Add as wildcard" workaround seems to be working well.  I would have never thought of it (I always associate the custom view with the source/headers/misc folder organization).

I'm looking forward to the SE  2015 beta for the feature you mention plus the auto save of unnamed buffers mentioned in another thread.

CpnFlannel

  • New Community Member
  • Posts: 1
  • Hero Points: 2
Re: Is there a way to specifiy a 'root' folder for a project?
« Reply #3 on: February 24, 2017, 04:25:16 pm »
I have found that you can modify the 'Projects' Directory View by editing your .vpj file (which is essentially just XML).

Find the <Files AutoFolders="DirectoryView"> tag within your project file - you'll notice several <Folder Name="my_folder"> tags nested within. Remove the undesired folder start-tags and their corresponding end-tags (i.e. </Folder>) to customize your project's Directory View in the Projects pane.

mwb1100

  • Senior Community Member
  • Posts: 145
  • Hero Points: 13
Re: Is there a way to specifiy a 'root' folder for a project?
« Reply #4 on: February 24, 2017, 07:19:25 pm »
Thanks for that tip - works great.