Author Topic: Find-in-files filters  (Read 1251 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Find-in-files filters
« on: March 25, 2021, 06:09:16 PM »
The "..." next to File types:

In a clean configuration

#1 why is "Powershell" not in the list?
#2 Why is the list not sorted in some way?
     Can it get sorted please?
#3 It would be nice for it to display the file patterns next to the name, like the FileTypes drop down list does

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6862
  • Hero Points: 528
Re: Find-in-files filters
« Reply #1 on: March 26, 2021, 12:57:48 AM »
#1 Not all languages are in the list. Not even close. There are way too many.
#2 The order of the list is customizable. Most likely the order of the default list will not be what you want. Nothing we can do about that. A sorted list would be a bit useless since most customers will want the languages they work on most to be at the top.
#3 Reasonable idea

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: Find-in-files filters
« Reply #2 on: March 31, 2021, 10:28:37 PM »
WRT #2:
Looks like the list in FindInFiles, def_find_file_types,  is customizable, but not the list used elsewhere.
For example, in the File->Open dialog - it appears to use def_file_types.

  • void _editfiletypes.lbutton_up() sets def_find_file_types
  • filters.e references "_filters_form" -- there is no such form. There is "_filter_form"
  • projconv.e: _filter_form_apply() modifies def_file_types but this function is never called.
  • defaults.e: defmain() sets def_file_types to the default value - just a big static string.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6862
  • Hero Points: 528
Re: Find-in-files filters
« Reply #3 on: March 31, 2021, 11:22:37 PM »
Currently you can only modify def_file_types under Tools>Options>File options> Filters. I’m not at my computer but this location should be close enough to get you there. Modifying def_file_types in the open dialogs is probably doable but not worth the effort (3 platforms with totally different code and APIs).

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: Find-in-files filters
« Reply #4 on: April 01, 2021, 02:43:15 AM »
Tools > Options > File Options > Files of Type Filters works.
Thanks.