Hi Ben! Have you tried
VeryLongClassNameIndeed val = (<caret> v.lastElement(); and press ctrl-shift-space? That seems to do the trick (if I don't misunderstand you...) cheers, /Mans > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > [EMAIL PROTECTED] > Sent: den 5 februari 2002 12:35 > To: [EMAIL PROTECTED] > Subject: [Eap-features] "Cast Expression" feature > > > This may have already been suggested, but never mind. > > Suppose I have code: > > Vector v = new Vector(); > v.add(new VeryLongClassNameIndeed(foo, bar)); > VeryLongClassNameIndeed val = v.lastElement(); > > Then the last line is an error, underlined with a wiggly line, > because I've > forgotten to cast the result of v.lastElement(). I'd like a feature to > automatically add the appropriate cast. Maybe an 'Cast Expression To X?' > Alt-Enter pop-up in the manner of 'delare final?' or 'add import?'. The > list that appears could suggest all compatible types. > > Cheers, > Ben. > > > > > _______________________________________________ > Eap-features mailing list > [EMAIL PROTECTED] > http://www.intellij.com/mailman/listinfo/eap-features > _______________________________________________ Eap-features mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-features
