Wildcard in completion

A while ago I found out that you can use "*" as wildcard in completion.
That would make a nice "tip of the day" or a short blog entry:

After invoking any completion (basic, smart, class name) you can for
example type "*mouse" and IDEA will filter the completions to only include
those suggestions that contain the string "mouse" (e.g. "addMouseListener").

When you accept a suggestion IDEA will of course overwrite the "*".

I am using that quite a lot recently.
The only slight drawback is that it currently does not work in completion
invoked inside JPA-QL...

0
7 comments
Avatar
Permanently deleted user

Where did you find this? I don't know of such a feature in IntelliJ IDEA
although I think it's nice and there's a similar issue:
http://youtrack.jetbrains.net/issue/IDEABKL-5632

0
Avatar
Permanently deleted user

You mean you didn't know it before? Or it doesn't work for you?

Here's exactly how it worked for me at least for the couple last weeks.
I tried it without thinking and it just worked.

After ctrl-space:



After typing  "*win"


After acepting one of the suggestions ("*" is removed automatically):


Peter Gromov (JetBrains) wrote:

Where did you find this? I don't know of such a feature in IntelliJ
IDEA although I think it's nice and there's a similar issue:
http://youtrack.jetbrains.net/issue/IDEABKL-5632


0
Avatar
Permanently deleted user

I know the wildcards work if you use "ctrl+n" to go to a class, which is really handy.

But too bad it doesn't work for incremental search, that would be useful too sometimes.

0
Avatar
Permanently deleted user

Hmm. Your use case still doesn't work for me. I can easily imagine a
plugin that could do such things, but not the core IDEA. BTW I was
thinking of   a more general case when you type * in the editor and only
then invoke completion. That's more difficult to implement.

0
Avatar
Permanently deleted user

No plugins installed (other than the bundled ones of course).
But I think I found what is different in my configuration:

In Editor->Code Completion I always set "Case sensitive completion" to "None".
When I switch that back to "First letter" (which is the default IIRC), then the
completion popup pops down as soon as I type the "*".

Hm, so it shouldn't be too hard to make it work regardless of that option, right?

;)


Peter Gromov (JetBrains) wrote:

Hmm. Your use case still doesn't work for me. I can easily imagine a
plugin that could do such things, but not the core IDEA. BTW I was
thinking of   a more general case when you type * in the editor and only
then invoke completion. That's more difficult to implement.

0
Avatar
Permanently deleted user

Hm, so it shouldn't be too hard to make it work regardless of that
option, right?

;)

Yes, it would be easy if the only thing you want is to be able to enter

  • when lookup is shown. An request please?

0

Thanks for looking into this: IDEA-25072

0

Please sign in to leave a comment.