Carlos,

The problem is that this refactoring is not targeted at situations you've
described. We use it when you are passing some parameters to a method and
perform some computation with parameters, which can (and should) be easily
be performed at the call site (e.g. eliminating ex-this variable after "make
state" refactoring to pass only needed fields, making code less dependant of
other subsystems, etc.) So it's purpose is not "change signature" as you
describe, but intelligent parameter creation by calculating it at each call
site.

--
Best regards,
Mike Aizatsky.
------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"Carlos Costa e Silva" <[EMAIL PROTECTED]> wrote in message
adirin$8p2$[EMAIL PROTECTED]">news:adirin$8p2$[EMAIL PROTECTED]...
> Yes.
>
> TWIW, I suggested this because up to now I always found that what I needed
> was to introduce a parameter in the place where the method is called and
> never from inside the method.
>
> Every time I tried to create the parameter from inside the method I had
to:
>
> Create the variable definition.
> Use the variable somewhere.
> Invoke the create parameter from the used variable.
> Remove the instruction creating the variable.
>
> That's to much work and not at all what idea has made me used to:)
>
> Carlos
>
> "Jacques Morel" <[EMAIL PROTECTED]> wrote in message
> aded54$c0v$[EMAIL PROTECTED]">news:aded54$c0v$[EMAIL PROTECTED]...
> > I agree with Carlos.
> > While programming by intention on an already defined method (in Carlos
> > example someMethod() ) it would be great to have 2 options: the one
> > currently available "create method" plus a new one "introduce parameter"
> to
> > the already defined method.
> > Are we on the same page Carlos?
> >
> > "Carlos Costa e Silva" <[EMAIL PROTECTED]> wrote in message
> > news:ad8ms8$jr6$[EMAIL PROTECTED]...
> > > Could we have an introduce parameter from the other side please:)
> > >
> > > void someMethod() {
> > >     ...
> > > }
> > >
> > > void test() {
> > >     Something something;
> > >     someMethod(something);
> > > }
> > >
> > > Result after introduce parameter:
> > >
> > > void someMethod(Something something) {
> > >    ...
> > > }
> > >
> > >
> > > I think find that I would find this very useful.
> > >
> > > The first time I read about a new refactoring Introduce Parameter I
> > thought
> > > this was it.
> > >
> > > Carlos
> > >
> > > --
> > > Carlos Costa e Silva <[EMAIL PROTECTED]>
> > >
> > >
> >
> >
>
>


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

Reply via email to