Author Topic: Folder view issues with wildcards  (Read 747 times)

TKasparek

  • Senior Community Member
  • Posts: 185
  • Hero Points: 23
Folder view issues with wildcards
« on: May 02, 2017, 02:00:33 pm »
This is related to this:
https://community.slickedit.com/index.php/topic,10884.msg46028.html#msg46028

Project Setup:
Ubuntu x64
<project dir>
  + dir1 : test.cpp
  |  \_ dir4 : test.cpp
  + dir2 : test.cpp
  |  \_ dir5 : test.cpp
  + dir3 : test.cpp
     \_ dir6 : test.cpp
         \+ dir7 : test.cpp

Wildcard 1 Setup:
* Add Tree, Recursive, Add as wildcard
* Select <proj folder>
* Select inclusive source file line: *.c;*.cc;*.cpp;...
* Exclude "dir3/"
* OK
* Add Tree, Recursive, Add as wildcard
* Select "dir3/dir6/"
* Select inclusive source file line: *.c;*.cc;*.cpp;...
* Exclude empty
* OK

Issues
1. * With Custom Folder View, enable Refilter Wildcards. All files are shown in a flat structure with relative paths. (I'm hoping this is the bug and not the next point...)
    * Disable Refilter Wildcards. All files are now shown in a directory structure where the custom top levels sort file types but then is in the nice directory structure below that. My favorite view.
2. * Exception with Refilter Wildcards disabled is that when the wildcard specifies a directory (dir3/dir6/), the directory is the starting point for folderization.

Wildcard 2 Setup:
* Add Tree, Recursive, Add as wildcard
* Select <proj folder>
* Select inclusive source file line: *.c;*.cc;*.cpp;...
* Exclude "dir3/"
* OK
* Add Tree, Recursive, Add as wildcard
* Select "dir3/dir6/"
* Select all files filter *.*
* Exclude empty
* OK

Issues
3. Even though the project files were setup with *.* file filter and Custom View "Source Files" specify *.cpp in the filter all files are shown in "Other Files"

Comments
4. I'm still not sure exactly what the purpose of Refilter Wildcards is. There is no help for it that I can find to explain it's purpose.
5. My ideal view would be being able to setup a top level filter to separate scripts/source/build files/etc but then have a directory view under those as I'm managing thousands of files.
6. Another pain point is not being able to add files with ant syntax. For example:
<project dir>/build/<build configuration dir>/dir8/
I want to be able to add /build/**/dir8 files but exclude files from /build and <build configuration dir> and hundreds of other directories that are in <build configuration dir> without specifying them specifically. Also, as a project is furthered, another <build configuration dir> can be created (or changed when branching with git), I want it to be picked up automatically with wildcards.

Attachment
Attached is the project tree and SE workspace/project files with the wildcard 1 setup, you can change easily to wildcard 2 setup by Removing All and following steps above from Project Properties.

Thanks

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1143
  • Hero Points: 103
Re: Folder view issues with wildcards
« Reply #1 on: May 02, 2017, 02:46:27 pm »
I am able to replicate the issues with Refilter Wildcards, it is behaving different than previous builds, I will look into that.

When you add *.* as a Wildcard, and you have Filters set on all other folders, the wildcard entry will get filtered to the first folder with an empty Filter, which is usually Other Files in most of SlickEdit default projects.  The wildcard will be expanded under Other Files in that case.  When you enabled Refilter wildcards, it will take all the wildcard file entries and sort them into the appropriate Folder by Filter type.

We have made some improvements for 21.0.3 to allow for ant-style "dir/**/*.ext" or "**/CMakeLists.txt" as wildcards, so hopefully that will help there.   I am going investigate issues you have documented, big thanks for including ready-made sample.  That's a huge help.

pmsteinm

  • Community Member
  • Posts: 78
  • Hero Points: 0
Re: Folder view issues with wildcards
« Reply #2 on: July 21, 2017, 02:37:43 pm »
I think I am having a similar problem. My project file has a mix of directories where I have recurse=0 in the .vpj and  recurse=1. In V20 that worked great giving me the folder view in the recurse=1 directories. With V21 all the recurse=1 directories show a flat listing of files. The refilter wildcard option does not seem to help (toggling it completely hoses up my project requiring me to revert to an saved .vpj file. Is there a workaround for this? I had to edit my vpj by hand a year or 2 ago to get it to show things the way I wanted (combination of manually created folders and automatic folders). Is there a way I should go about creating the project file from scratch under V21 to get my mixed behavior? I figured the way the project file worked was the only place folders got automatically created was when recurse was set to 1. Otherwise the other folders are ones I create.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1143
  • Hero Points: 103
Re: Folder view issues with wildcards
« Reply #3 on: July 21, 2017, 03:49:09 pm »
In v21.0.3?  In Custom View with Refilter enabled, all wildcards are inserted in a flat file view sorted by folder filters.   Without refilter, wildcards are inserted into parent root folder, then by folder matching the relative path.  That should always be the case even for non-recurse wildcards.  There is a def-var that will force non-filtered wildcards to show in a flat file list, def_project_wildcard_flat_file_list.  Maybe that got enabled?  You would have to show me an example project and maybe some screenshots to better understand what you seeing and try to figure out what you'd like to see.

pmsteinm

  • Community Member
  • Posts: 78
  • Hero Points: 0
Re: Folder view issues with wildcards
« Reply #4 on: July 21, 2017, 06:47:34 pm »
Yes, the problem is in 21.0.3 on Linux x64.  I have something like this:

Manual Folder1
  file1 (selected by wildcard, no recurse)
  ...
  file10 (selected by wildcard, no recurse)
Manual Folder2
  <entire dir selected by wildcard, recurse)


In VS 20.0.3 under Folder2, I see a bunch of folders each with files, matching the directory structure under the parent dir I've selected.
In VS 21.0.3 under Folder2, I see all the files from all the subdirs listed flat in alphabetical order. There are no sub folders shown under folder2.

I'm sure something more complicated is going on (I have a lot more than folder1 and folder2). I can't give you the project file directly. I will have to spend some time creating a sanitized screen shot and project file.

Does the GUID field in the .vpj doing anything? Is there some secrect sauce encoded in there that I might need to wipe out?

The variable def_project_wildcard_flat_file_list is not set, and I don't have refilter wildcards checked. I know its hard to debug without seeing the actual project files, but I was hoping you might have some ideas for me to try before I spend a bunch of time creating some sanitized stuff (which I won't be able to get to for a few days).

The other weirdness is we have a bunch of silly links to links and to parent dirs. Since things are such a mess with our file structure, I use absolute paths (all starting with "/") with all links resolved for adding everything in my .vpj manually (I did not use the GUI to create it).

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1143
  • Hero Points: 103
Re: Folder view issues with wildcards
« Reply #5 on: July 24, 2017, 04:10:53 pm »
There was a definite change in how wildcard files with recurse are added between 20.0.3 and 21.0.3.  In 20.0.3, subfolders were added starting from the folder root of the wildcard expression.  In 21.0.3, instead of the using folder root from the wildcard expression, subfolders are added based on the file path relative to the project file.  There were reasons to change the layout to simplify things, but maybe that didn't work out so well.  Going to re-think that change, whatever feedback you have is welcome.  It would still be nice to have an example for test and your preference for how the wildcards folders are sorted.