Menu

#49 Add flag to exclude some project files from search

Next_Release
open
Bug_Report
2017-12-13
2014-09-16
Riot
No

Searching for text in all project files, or in all workspace files, is a very useful feature - however, in some of my projects I include large files including binary blobs. Searching through these is unnecessary and slows down the search time considerably in some cases. These files still need to be compiled and linked, so they do need to be part of the project.

Currently there are "Compile file" and "Link file" tickboxes in file properties that are on by default for recognised source files. I propose adding a third tickbox, "Include in search" that is on by default for the same files, and can be manually switched off.

Related

Tickets: #1257

Discussion

  • ollydbg

    ollydbg - 2014-09-17

    Search can be limited to a "build target", so you can just add some kinds of "virtual build target" to include your source files.

     
    • Riot

      Riot - 2014-09-17

      That's a nice workaround I hadn't thought of, but it has some problems - aside from having to add a new target, every time you open the search dialogue the project to search in target reverts to your currently selected target, instead of remembering your last setting. Without that, having to make three extra clicks every time you do a ctrl-shift-F search is an inconvenience. This is also a bit less convenient than having a native option to toggle search on individual files in general, which I think would be quite useful and a lot more self-explanatory.

       
    • Riot

      Riot - 2014-09-19

      Further to my last comment, it also occurred to me that I frequently use the right-click context menu option "find occurrences of", and it would be very helpful if some files could be excluded from this search in the same way - limiting them to a certain target does not do this as that option searches the entire project.

      If there are large binary blobs, this search fails:

       
  • Teodor Petrov

    Teodor Petrov - 2014-09-27

    I don't think the proposal for a fix is very good.

    What we can really do is add an option to thread search to limit the search based on an extension, regex or probably execute some script stored in the project that tells it particular file should be searched or not.

     
    • Riot

      Riot - 2014-09-29

      That would be fine for local editing, as long as it kept its settings between searches (currently the search box does not remember the last chosen target). But for a project shared between many contributors it would be much more useful to be able to mark certain files as to "never search this", the same way files can be excluded from compiling or linking on a per-target basis. Leaving the "exclude from search" box unticked would be the default option, so default behaviour would not change, and additional data wouldn't be stored in the project file unless this option was changed by the user for individual files, so there'd be no extra bloat. The real ideal solution though would be to have both - a per-file exclude that is stored in the project, AND a configurable regex for the search system on the user's side.

       
  • Teodor Petrov

    Teodor Petrov - 2014-09-27
    • labels: --> thread-search
    • assigned_to: Teodor Petrov
     
  • Morten MacFly

    Morten MacFly - 2015-02-07
    • Type: --> Undefined
     
  • Morten MacFly

    Morten MacFly - 2015-05-01
    • Type: Undefined --> Bug_Report
     
  • bluehazzard

    bluehazzard - 2017-12-13

    Ok, i made a patch that saves the current selected project and target.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.