type quick fix [message #220026] |
Sun, 04 December 2005 02:12  |
Eclipse User |
|
|
|
Hi,
When I add a new variable, with a type that is unknown yet, I would expect
the quick fix to suggest the import of the appropriate class. Why doesn't it
do so?
|
|
|
|
|
Re: type quick fix [message #220949 is a reply to message #220076] |
Tue, 20 December 2005 16:07  |
Eclipse User |
|
|
|
Originally posted by: eclipse3.rizzoweb.com
Zohar wrote:
> Let's say you have the following:
>
> public int myMethod() {
> URL |
> return 1;
> }
>
> (the '|' denotes my cursor position)
> then "URL" is flagged as an error, and using quick fix has no suggestions.
> Only if I go back and use Content Assist it helps, but that's a bit of a
> hassle as it interrupts my "flow" of writing the code. I would have liked it
> if quick fix would suggest the import and let me on with my writing.
With exactly that typed in, there is no Quick Fix available. This is
because the line is not parsable enough for Quick Fix to do anything
yet. If you go ahead and type a variable name and semicolon, then Quick
Fix for the URL will suggest the import.
That said, given the state you describe above, all you have to do is hit
back-space or left-arrow and invoke Content Assist (Ctrl+Space) and it
will do the import for you.
It sounds as if you might be thinking of something else when you say
"quick fix" because Quick Fix always requires user action to invoke,
either mouse or keyboard.
HTH,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.07710 seconds