Menu

#517 Feature 3614792: allow wildcard in Directory search

pending-rejected
nobody
None
5
2013-11-26
2013-11-11
anavi
No

This patch make it possible to

Discussion

  • anavi

    anavi - 2013-11-11
     
  • anavi

    anavi - 2013-11-11

    This patch makes it possible for us to search and replace with wild-carded path.

     
  • Alan Ezust

    Alan Ezust - 2013-11-21

    When I open the search/replace dialog, I can search in a directory and specify a
    "filter" and a "directory" field, but there is no "path". I've tried specifying wildcards as part of the path in the "directory" field but I always get "specified search contains no files" if I specify a "directory" with
    something/*/somethingelse in it.

    Can you please provide step-by-step instructions for how to test this feature? Preferably using the jEdit source code tree as a test case.

     
  • anavi

    anavi - 2013-11-21

    I'm sorry but what I mean by "path" is the canonical path string of the directory. And yes, there are only "filter" and "directory". Users can input in the "directory" a wildcard expression of a directory (or directories, since wildcard expression may represent more than one directory). According to my experience on testing this feature on Mac OS and Linux, the reason why "specified search contains no files" appears is that there are really no such files in the directory or the format of the files contained in the directory does not satisfy the requirement.

    What I suggest is you first choose a directory that contains valid files (*.java, *.txt or something) and then you modified the expression by deleting some substring and inserting **. For example, you first choose "/Users/Tom/tablets/Mediator/folder1" (this directory contains a bunch of .txt files on my Mac) and search and then you modified the path into "/Users/Tom/tablets/**/folder1" and search. Hope this helps.

     
  • Anonymous

    Anonymous - 2013-11-26
    • status: open --> open-rejected
     
  • Anonymous

    Anonymous - 2013-11-26

    As I see it, there are quite a few problems with this patch. Some of them are listed below. We can use this patch if you take care of these problems. In addition, every such feature should be documented in the user guide - and that should be part of the patch.

    1. What if the wildcard is in the middle of a name? Like /usr/local/a*?
    If there is no such path "/usr/local/a", nothing will be searched.
    2. If the directory before the '*' has no sub-directories, nothing will be searched. '*' usually also counts for "nothing".
    3. The patch is very partial; wildcards can also be "?". If you're going to support wildcards, they should be supported in full, not with many conditions.
    4. What about VFS? The patch should also check VFS for directories that are not in the local machine.
    Maybe there are other issues, I haven't checked more deeply.

     
  • Alan Ezust

    Alan Ezust - 2013-11-26

    ** is a regex metacharacter that means something in ant when specifying filters and filespecs but it is not a standard regex character, so make sure you document what regex characters are allowed and what they mean.

     
  • Alan Ezust

    Alan Ezust - 2013-11-26

    Also, I think I meant glob, not regex in my previous message.

     
  • Anonymous

    Anonymous - 2013-11-26
    • status: open-rejected --> pending-rejected
     

Log in to post a comment.