Author Topic: Add tree exclusion  (Read 534 times)

at5dapa1

  • Senior Community Member
  • Posts: 232
  • Hero Points: 22
Add tree exclusion
« on: March 01, 2022, 12:25:40 pm »
I was trying to add a "folder2" tree (recursive, show subfolders, add as wildcard, source files = "*.c;*.h;Makefile;*.mak;*.s;*.ld;*.bat;*.yml") but from where I want to exclude src\app\.
However I don't want boot\src\app\ to be excluded: is this possible? At the moment both paths are excluded  :(

The folder structure looks like this:
project.vpj/vpw
folder1
+ folder2
+ + boot\src\app\     <--    I want this included
+ + boot\src\others\
+ + src\app\             <--    I want this excluded
+ + src\others\

Thanks!

(SEv26.0.1.0 64-bit Qt5, hotfix_se2601_5_cumulative.zip , Win10x64.1909)

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2744
  • Hero Points: 145
Re: Add tree exclusion
« Reply #1 on: March 01, 2022, 12:38:43 pm »
How are you trying to add folder2?

at5dapa1

  • Senior Community Member
  • Posts: 232
  • Hero Points: 22
Re: Add tree exclusion
« Reply #2 on: March 01, 2022, 01:27:00 pm »
From menu Project -> Project properties -> Files -> Add Tree -> Navigate to path: D:\path\folder1\folder2\
- Set source files mask: "*.c;*.h;Makefile;*.mak;*.s;*.ld;*.bat;*.yml"
- Set exclude files mask: "<Default Excludes>;.svn\;.CVS\;SSCS\;.DS_Store;*.vpw;*.vpj;*.vpwhist;*.vpwhistu;.git\;bin\;obj\;GNU ARM v10.2.1 - Default\;utest.c;test_*.c;unit_test_ceedling\;unittests\;src\app\;EFM32TG11B\;EFM32HG\;EFM32GG11B\;efm32gg12b810f1024gq64.h"
- check Recursive, Show subfolders, Add as wildcard and Create parent directory folder
- press OK

Result is that files from both D:\path\folder1\folder2\src\app\ and D:\path\folder1\folder2\boot\src\app\ are excluded, while I wish only to first to be excluded.
Thanks!

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2744
  • Hero Points: 145
Re: Add tree exclusion
« Reply #3 on: March 01, 2022, 01:29:35 pm »
In your example, the app/ directory is always a "leaf" directory.  If that's the case, try adding "app/" to exclude files.

at5dapa1

  • Senior Community Member
  • Posts: 232
  • Hero Points: 22
Re: Add tree exclusion
« Reply #4 on: March 01, 2022, 01:47:24 pm »
It didn't work because app/ is a leaf for both paths: so both D:\path\folder1\folder2\src\app\main.c and D:\path\folder1\folder2\boot\src\app\main.c are excluded.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2744
  • Hero Points: 145
Re: Add tree exclusion
« Reply #5 on: March 01, 2022, 01:59:45 pm »
Sorry, I'm still on my first cup ;).  Give me a minute.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2744
  • Hero Points: 145
Re: Add tree exclusion
« Reply #6 on: March 01, 2022, 02:30:22 pm »
Please try changing src\app\ in your exclude files to **folder2/src/app**

at5dapa1

  • Senior Community Member
  • Posts: 232
  • Hero Points: 22
Re: Add tree exclusion
« Reply #7 on: March 01, 2022, 02:53:58 pm »
Thanks for trying to look into this, but unfortunately id didn't work.
I'm guessing it's because folder2 is part of the tree root "D:\path\folder1\folder2\" so maybe SE uses exclusion relative to that root?
I tried also "**folder2/src/app/**" or "**/folder2/src/app**" or "**/folder2/src/app/**" and also this (which could be invalid ant syntax) "**/../folder2/src/app**" but no help.
I also tried absolute path "D:\path\folder1\folder2\src\app\" or "D*\path\folder1\folder2\src\app\" because in SE help there is this example: C*\  => Exclude any files in paths that start with "C". But this absolute filter also didn't work (both paths are included)  :(

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2744
  • Hero Points: 145
Re: Add tree exclusion
« Reply #8 on: March 01, 2022, 03:12:18 pm »
Using the filespec I said, I get the following (see attached picture).  This is what you're trying to get, correct?

at5dapa1

  • Senior Community Member
  • Posts: 232
  • Hero Points: 22
Re: Add tree exclusion
« Reply #9 on: March 01, 2022, 03:43:58 pm »
Attached is the example I tried and for me the folder2/src/app still goes in...

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2744
  • Hero Points: 145
Re: Add tree exclusion
« Reply #10 on: March 01, 2022, 04:02:09 pm »
Hmm, can  you do the add from folder1?  You would have to clear the wildcards that are there.

at5dapa1

  • Senior Community Member
  • Posts: 232
  • Hero Points: 22
Re: Add tree exclusion
« Reply #11 on: March 01, 2022, 04:23:03 pm »
If I add from folder1, can I tell SE to include the "*.c;*.h;Makefile;*.mak;*.s;*.ld;*.bat;*.yml" files only from subfolder folder2?
Because in folder1 I have other many projects (in this example folder2b, folder2c) which I don't want to be included.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2744
  • Hero Points: 145
Re: Add tree exclusion
« Reply #12 on: March 01, 2022, 04:30:50 pm »
How about this: go to folder2\boot, add those files.  Then click Add Tree again, and you can add anything else you need from folder the other file and you can use your original src\app\ exclude, because the files you want in boot\src\app are already added.  It will add more than one set of wildcards.

at5dapa1

  • Senior Community Member
  • Posts: 232
  • Hero Points: 22
Re: Add tree exclusion
« Reply #13 on: March 01, 2022, 04:49:44 pm »
Yes, this 2 steps addition works fine! Thanks Dan!

at5dapa1

  • Senior Community Member
  • Posts: 232
  • Hero Points: 22
Re: Add tree exclusion
« Reply #14 on: March 01, 2022, 05:25:27 pm »
one little annoyance of this 2-steps creation is that the Projects tool merges different folders into a single one which could be misleading.
Steps 1 and 2: add the folders with "Show subfloders" checked
Step 3: check the resulted inclussions => looks good
Step 4: check the Projects tool: boot\src\more and src\more are merged