Author Topic: [feature request] search exclude #ifdef's?  (Read 5509 times)

Offline Hans Henrik

  • Multiple posting newcomer
  • *
  • Posts: 23
[feature request] search exclude #ifdef's?
« on: January 03, 2009, 12:49:03 pm »
like the subject says...
would it be an idea to add a option for search to exclude searching in specific #ifdef~'s?

(and i *guess* its possible with some WayToCompilcatedRegEx already but.. i have no idea how to write a regex like that)

also.. this is the right place to post feature requests, right??
an other idea: feature-request board?

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: [feature request] search exclude #ifdef's?
« Reply #1 on: January 03, 2009, 09:09:02 pm »
Hi!

It is not possible with ThreadSearch plugin, because it uses a line by line algorithm and the parser can't know it line is contained inside an ifdef.
I don't remember for standard search in files.

Dje

Offline Hans Henrik

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: [feature request] search exclude #ifdef's?
« Reply #2 on: January 04, 2009, 06:01:47 pm »
both standard search and thread-search has support for regular expressions, so line-by-line should be no problem.. (using regex to store each line for comparison, like ^(.*)(\r?\n\1 )  )

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: [feature request] search exclude #ifdef's?
« Reply #3 on: January 04, 2009, 06:07:17 pm »
what I mean is parser gets one line, looks if this line matches regexp, not the whole text file, and stores result in this case.
You can't know what was before, even with backtracking.

Dje

Offline Hans Henrik

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: [feature request] search exclude #ifdef's?
« Reply #4 on: January 05, 2009, 11:42:33 am »
ok...

so i guess thats where the developing comes in. :p

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: [feature request] search exclude #ifdef's?
« Reply #5 on: January 05, 2009, 11:54:31 am »
Not sure!
It's a big change in code and loggers are not really adapted to log multi line searches.
What I don't like in this approach is you do not know the size of the file.
What do you log or how do you make the search on a generated 4 Go cpp file??
My 720 Mo of RAM are not sufficient ;)

Dje

Offline Hans Henrik

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: [feature request] search exclude #ifdef's?
« Reply #6 on: January 05, 2009, 06:42:19 pm »
Go=GB?

can maybe store parts on hhd and search and store parts on hhd and search~ or something... idk :p

we'll was just an idea tho

and what about that *where to post feature request's* :?:
its here right?

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: [feature request] search exclude #ifdef's?
« Reply #7 on: January 05, 2009, 06:55:35 pm »
Not to be lost, you'd better post feature requests on BerliOS but for example, standard search in files depends on C::B "core" whereas I developed ThreadSearch plugin and I don't look at feature request on BerliOS.

Dje