wild card behaviour in Ctrl+N: bug or feature?
Hi there,
Just noticed something in the way wildcard is treated in the go to class
dialog and I'm not sure if it's a bug or the intended behaviour.
Say I have the following classes:
ClassTest
ClassOtherTest
ClassTestingOutput
Typing "*Test" in the Ctrl+N dialog shows all three classes, I would expect
just the first two to show up. If I wanted all of them, I'd type "Test".
With the current behaviour, there is no way to differentiate between classes
ending in a string from classes containing the string in their name. Is this
intentional? I'm on 1131.
Thx,
Andrei
Please sign in to leave a comment.
Andrei Oprea wrote:
>Just noticed something in the way wildcard is treated in the go to class
>..
>Is this intentional? I'm on 1131.
>
I think it's a feature, as it's coherent with the wildcardless usage of
Ctrl-N
BUT
there is a missing feature, in the currentl behaviour of Ctrl-N: there
is no 'end-of-line' marker.
I think is the most natural end-of-line marker, and I was
supprised when it didn't work as I expected (see suggestion below).
Current behaviour:
-
eg.
Ctrl-N + value= /*Ui/
currently displays
UiUtil
UtilUi
I'd suggest :
Enhanced behaviour: (future request)
-
eg.
Ctrl-N + value= /*Ui[Space]/
would only display
UtilUi
What do you think?
Alain
+1
Sounds exactly right. I've missed that 'end of name' functionality a couple of times. Having 'space' be the implicit marker sounds intuitive and strong.
--Dave
Well, * is supposed to replace a group of characters and it's been offered
as a substitute for a more advanced regexp syntax (if I remember some older
discussions correctly). I don't think it should change anything else in the
search pattern.
So "*Ui" should find all the classes ending in Ui
while "Ui" should find all the classes containing Ui somewhere in their
name.
I'd find it confusing to have to remember that * means different things
(depending on how I end the string). And I find the current behaviour
limiting, as I can't look for classes ending in a pattern.
So I think * should mean any number of characters, period. Let the user
place another * at the end of the search pattern if they don't care how the
class' name ends.
Just double-checked: Te* does not find classes like SomeTest, only classes
starting in Te. So depending on where the * is placed, the search is done
differently. And I failed to figure out the logic for searching, trying
different search patterns (with several wildcards in one string, in
different places) just confused me more.
So, I guess, the question stays: what is * supposed to mean?
Thx,
Andrei
"Alain Ravet" <alain.ravet.list@wanadoo.be> wrote in message
news:bvm1u3$dh0$1@is.intellij.net...
>
>
>
>
>
>
>
>
When we just added wildcards functionality into Ctrl-N popup there was no
impliciltly added '*' in the end as now. But after a few days of use it
appeared to be extremely inconvenient and non-consistent with Ctrl-N
behaviour when no wildcards were used. So I think the current behaviour is
better. An end marker is a good idea though. Has anyone submitted a feature
request?
--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Andrei Oprea" <andrei_oprea@hotmail.com> wrote in message
news:bvm3ci$b54$1@is.intellij.net...
older
the
>
>
>
the
>
>
>
>
>
>
class
>
>
Valentin Kipiatkov (JetBrains) wrote:
>request?
>
Done:
http://www.intellij.net/tracker/idea/viewSCR?publicId=28584
Alain