+1

I missed this too.

Tom

At 17:01 10.12.01 +0000, you wrote:

>Hi,
>
>Using 2.5 all seems pretty much ok. Just something I realised though with
>CTRL-SHIFT auto complete which would increase the "magic" factor... take
>the following:
>
>Vehicle is an interface
>Car implements Vehicle.
>garage has a getVehicle() method that returns a Vehicle.
>
>Now take the following code ( underscore is the cursor pos):
>
>   Car c = (_
>
>After the parenthesis you press CTRL-SHIFT. This gives you:
>
>   Car c = (Car)_
>
>Now you type:
>
>   Car c = (Car)garage._
>
>...now in IDEA up to 2.5 you press CTRL-SHIFT here and nothing happens.
>
>There are no methods that return a Car, only Vehicle.
>
>However, if IDEA could pay attention to polymorphism like this without it
>really affecting performance badly, you should be able to get it to
>suggest getVehicle() because it should be aware that we are casting, and
>so anything that returns a "base" of Car is a possible match.
>
>Of course this could cause problems in terms of huge suggestion lists
>(Object is base of everything) but perhaps not allowing Object would
>solve this � although it would exclude a lot of suggestions that might be
>right � perhaps sorting them in order of "closeness" to the target type
>would work? i.e.
>
>   Car c = (Car)garage.[getVehicle()    ]
>                       [getSomeObject() ]
>
>$0.02
>
>Cheers


_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features

Reply via email to