Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Regexp in "open file in solution"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gamifiq
New Member

4 Posts

Posted - May 23 2011 :  04:53:18 AM  Show Profile  Reply with Quote
Hello,
What I suggest is as simple as that :
having regexp enabled in "open file in solution" search field.

It would really be helpfull in my case.
To Keep It Simple Stupid, let's say my VS C++ project is a ASPXCompiler.
Several project files containes "aspx", like
- EditorAspx.cpp
- LexerAspx.cpp
...
and even Aspx.cpp

So, when I want to open "Aspx.cpp" I just type "aspx" and then I'm struggling to find the correct file in the middle of an hazardously ordered list... because too many fils contains aspx in their name.

I wish I could type "^Aspx" to get my only file starting with aspx.
Thank you.

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - May 23 2011 :  10:18:43 AM  Show Profile  Reply with Quote
You can do this currently, simply use the filter string "/aspx". The Open File dialog allows you to search based on the file path, as well as the file name, so this will pick out all items where the file or directory name start with "aspx".

zen is the art of being at one with the two'ness
Go to Top of Page

gamifiq
New Member

4 Posts

Posted - May 23 2011 :  11:43:09 AM  Show Profile  Reply with Quote
Great!
=> Actually, it only works with "\\aspx" (and not /).

In my case, using "\\" is efficient enough, but i wouldn't be surprised to see this suggestion coming back for a more complex search string.
like : "What is you need to see File*_Asp.cpp but not File*_Aspx ?"
=> asp[^x]

Thanks
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - May 23 2011 :  12:02:10 PM  Show Profile  Reply with Quote
You can do some fairly complex searches with a bit of care, by combining normal "positive" search terms with "negative" terms. Put a - before any term, to exclude all items that match this term.

So in this case "-\\aspx" should do what you want.

Personally I have a love / hate relationship with regular expressions. I love their power, flexibility, and how useful they are, but I hate that fact that every tool I use that supports them seems to do so differently. Just try using regular expressions in the IDE find dialog *sigh*

zen is the art of being at one with the two'ness
Go to Top of Page

daniel-kun
New Member

Germany
4 Posts

Posted - May 26 2011 :  06:07:54 AM  Show Profile  Reply with Quote
I totally vote this up!
I'd really really like regexp searches in Alt+Shift+O, and Alt+M.
Go to Top of Page

AdrianS
Senior Member

Canada
31 Posts

Posted - May 26 2011 :  07:51:47 AM  Show Profile  Reply with Quote
As a first step, I would find anchors (^, $) tremendously useful in "Find Symbols". I often know what characters the symbol starts with, so a "start of line" anchor would be very helpful in filtering the symbol list.

In particular, we have over 1000 exported API calls in our code that all start with a two letter prefix. A start-of-line anchor would allow me to target only the API symbols when searching. As it is now, all occurences of the prefix characters get included in the symbol list, no matter where they occur in the symbolvc
Go to Top of Page

daniel-kun
New Member

Germany
4 Posts

Posted - May 26 2011 :  07:54:08 AM  Show Profile  Reply with Quote
Yes, this would be the main usage scenario for me, too.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - May 26 2011 :  1:34:23 PM  Show Profile  Reply with Quote
We are looking to add "markers" to specify the start and the end of a word to the Find Symbol dialog:

case=5977

Does anyone have a good case for more complex regular expression searching in these dialogs or the Alt-M list?

zen is the art of being at one with the two'ness
Go to Top of Page

daniel-kun
New Member

Germany
4 Posts

Posted - May 27 2011 :  01:06:28 AM  Show Profile  Reply with Quote
Well at least a * placeholder would be useful for listing all functions like ::Get*Info(), when you have e.g. GetRecordInfo(), GetRowInfo(), etc. in one class.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - May 27 2011 :  1:10:39 PM  Show Profile  Reply with Quote
Here you can simply use the filter string "get info", which will list both "GetRecordInfo()" and "GetRowInfo()". You can combine several different search strings, separated by spaces, to get the desired result.

zen is the art of being at one with the two'ness
Go to Top of Page

gamifiq
New Member

4 Posts

Posted - May 30 2011 :  06:09:29 AM  Show Profile  Reply with Quote
My case : any function returning an Integer starts with n.

- nGetXXXX()
- nCountOf()
...

If I juste type "n" I would have too many results, because names containing "n" would be listed.

(For file names, you can use "\\" to do the trick. But for method names, you're stuck.)
Go to Top of Page

daniel-kun
New Member

Germany
4 Posts

Posted - May 30 2011 :  06:23:46 AM  Show Profile  Reply with Quote
You can use ::n, because every method starts with ClassName::. But then you can not filter "Any method of any class returning int, starting with n". But usually a file should only include one class' method implementation, which means this should be a non-problem.
I think regexex may indeed be rarely required, but wildcards (*) and start- and end-markers would be very handy.
Go to Top of Page

gamifiq
New Member

4 Posts

Posted - May 30 2011 :  09:40:17 AM  Show Profile  Reply with Quote
Nice trick ( ::n i mean )

Even if, in reality, my functions may start with "_" when private or protected :
- nGetX()
- __nGetX()
which I would solve using "::[_]*n" pattern.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - May 30 2011 :  1:08:10 PM  Show Profile  Reply with Quote
We are looking to add markers to indicate the start or the end of a symbol. What I am wondering is if regular expression searching offers enough advantages to out way the complexity.

For wildcards, is the ability to use two or more separate search strings not enough?

zen is the art of being at one with the two'ness
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 07 2014 :  10:03:27 AM  Show Profile  Reply with Quote
case=5977 is implemented in build 2052

Use period/dot to delimit start and end of words:
.n
will match words that start with n
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000