Invoking Intention Action explicitly

Is there any way to cause the intention menu to appear
on demand? I don't mean by pressing ALT+ENTER, but rather
forcing IDEA to suggest what's missing/wrong on demand,
even when not on the error/fix location.

This is the case, for me at least, when typing in a new method call. IDEA suggests to create the method, and that
is fine. However, I dont get to choose where in the file
the method gets placed. What I want to do instead is move
to the location in the file I want the method to be placed
and ask IDEA to pop up the intentions list, amonst which
I expect to find the intention for creating the method.

Can this be done? Or is it a good opportunity for an ECR?

Cheers,

Bonny

2 comments

This is related to http://intellij.net/tracker/idea/viewSCR?publicId=9541 I think.

-Keith

Is there any way to cause the intention menu to appear
on demand? I don't mean by pressing ALT+ENTER, but rather
forcing IDEA to suggest what's missing/wrong on demand,
even when not on the error/fix location.
This is the case, for me at least, when typing in a new method call.
IDEA suggests to create the method, and that

is fine. However, I dont get to choose where in the file

the method gets placed. What I want to do instead is move

to the location in the file I want the method to be placed

and ask IDEA to pop up the intentions list, amonst which

I expect to find the intention for creating the method.

Can this be done? Or is it a good opportunity for an ECR?

Cheers,

Bonny


0

Keith,

While this will solve the problem in the particular
example I posted, what I'm after is more involved: there
may be many intentions IDEA can suggest at any point
in time, depending on the currently edited class; what
I'm after are these suggestions which are not specific to
the location the cursor is in.

This has a cost, of course, since IDEA has to compute
these intentions, and some are more expensive to come
up with.

What I'd like to see is the ability to assign
weights to the types of intentions that can be added to
the pop up and let me decide whether I'm happy for IDEA
to take that little bit longer to compute the set of
possible intentions and show me a more complete set
(including some that pertain to actions related to
other locations in the file), or whether I'd rather not
wait at all and the list should be restricted only to
the intention actions that can be taked with regard to
the current cursor location.

Hope this clarifies my request better.

0

Please sign in to leave a comment.