Introduce field from method-parameters
Hi,
I´m implementing the interface LoginModule with the method
public void initialize( Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options )
I want now to create the fields
private Subject subject;
private CallbackHandler callbackHandler;
and the default-assignments in the method-body. Can IDEA help me?
Please sign in to leave a comment.
On Wed, 29 Oct 2003 21:46:21 +0000 (UTC), Johannes Schneider
<idea@johannes-schneider.info> wrote:
>
>
>
>
Right now no. But you can rename initialize as a constructor, use
intention "Create field for Parameter" and rename it
back to initialize. (Rename in the old way, not refactor it)
Isn't perfect but it works
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Johannes Schneider wrote:
Yes indeed. Type 'subject' in the method body and press CtrlAltF.
Ditto for others.
Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Dmitry Lomov (JetBrains) wrote:
>>I´m implementing the interface LoginModule with the method
>>
>>public void initialize( Subject subject, CallbackHandler callbackHandler,
>>Map sharedState, Map options )
>>
>>I want now to create the fields
>>private Subject subject;
>>private CallbackHandler callbackHandler;
>>[...]
>>
>>and the default-assignments in the method-body. Can IDEA help me?
I've always wondered why I couldn't use CtrlAltF directly on the
parameter? Is it a matter of where to place the assignment statement?
Ciao,
Gordon
--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919