Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Hans Henrik on January 03, 2009, 12:49:03 pm

Title: [feature request] search exclude #ifdef's?
Post by: Hans Henrik 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?
Title: Re: [feature request] search exclude #ifdef's?
Post by: dje 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
Title: Re: [feature request] search exclude #ifdef's?
Post by: Hans Henrik 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 )  )
Title: Re: [feature request] search exclude #ifdef's?
Post by: dje 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
Title: Re: [feature request] search exclude #ifdef's?
Post by: Hans Henrik on January 05, 2009, 11:42:33 am
ok...

so i guess thats where the developing comes in. :p
Title: Re: [feature request] search exclude #ifdef's?
Post by: dje 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
Title: Re: [feature request] search exclude #ifdef's?
Post by: Hans Henrik 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?
Title: Re: [feature request] search exclude #ifdef's?
Post by: dje 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