Propagate parameters: neat!
Hi there,
Got to use this for the first time, and I love it. For me, this is what marks
the point of no return for Irida EAP (not to say the other new Irida features
weren't nice, but nothing to compensate for the debugger not working properly,
for instance).
And now that I'm hooked, I'll have to start lobbying for the bugs that ...
bug me, I guess. :)
Best,
Andrei
Please sign in to leave a comment.
Andrei
>
How does it work? Could you give a trivial example.
I tried many ways of introducing parameters in methods, but didn't see
anything propagate, while I needed it.
Alain
Hello Alain,
On the change method signature refactoring dialog you'll see two buttons
(close to the top rigth corner): one for exceptions, and another one for
parameter propagations.
If you add a new parameter (for instance) and choose to propagate the parameter,
you'll be presented with another dialog that shows the call tree, with options
to refactor the caller methods as well (there are check-boxes so you can
specify the ones you want to propagate the parameter for).
HTH,
Andrei
Oh, and this is only for the latest build, 3229.
Andrei
>> How does it work? Could you give a trivial example.
>> I tried many ways of introducing parameters in methods, but didn't
>> see
>> anything propagate, while I needed it.
>> Alain
Andrei,
Thanks.
When you've been using a tool for years, your eyes and fingers work
automatically, and you don't read those complex dialog as a newbie would.
That's why a little explanation/example would be welcome, when they
introduce a new feature, but that's another story.
And I rarely use "Change Method Signature" to add or remove parameters,
as intentions are available.
I've just posted 2 related requests:
- Propagate parameters deletion
http://www.jetbrains.net/jira/browse/IDEA-622
- Propagate parameters: make it work with "Introduce Parameter"
http://www.jetbrains.net/jira/browse/IDEA-621
Alain
Alain,
I knew it would be you who'll post these requests:-)
Eugene.
"Alain Ravet" <alain.ravet@biz.tiscali.be> wrote in message
news:cvhnph$hev$1@is.intellij.net...
>
>
>
>
>
>
>
>
Eugene
>I knew it would be you who'll post these requests:-)
>
There is only one way to read this: you were thinking about it, but you
also were too lazy to do it yourself.
;)
And some people find the EAP is useless!!
Alain
"Alain Ravet" <alain.ravet@biz.tiscali.be> wrote in message
news:cvhp49$miv$1@is.intellij.net...
>
>
>
Not me:-)
Though, as I'm indeed as lazy as you've guessed, I think that sometimes
being lazy is not a bad thing at all:)
Seriously, I don't quite understand how the propagation of parameter
deletion should work.
Eugene.
BTW, we have a holiday in Russia and in JB today=)
Eugene
I gave an example in the request:
http://www.jetbrains.net/jira/browse/IDEA-622
Alain
In article <cvhp49$miv$1@is.intellij.net>,
Alain Ravet <alain.ravet@biz.tiscali.be> wrote:
No I'd read it as they know it's needed, and they know it's going to be
asked for, and they know their feature was complete enough to toss out
there to get some feedback while they add more in the next round. :)
R
Eugene Vigdorchik (JetBrains) wrote:
We do? No one told me! I'm going home. Cya!
--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
You are in St. Peterburg? I though you were sitting in Praha?
Tom
Hello Thomas,
And why would that be a problem? I'm feeling like taking a day off myself,
just to support them. ;)
Andrei
Hello Alain,
But doesn't the intention bring up the change method signature dialog anyway?
Or is it another way of using it (while still taking care of all the references)?
Andrei
Andrei Oprea wrote:
>
>> And I rarely use "Change Method Signature" to add or remove
>> parameters, as intentions are available.
>
>
>
No it doesn't. It's fast, but the drawback is that you can't choose
where to place the new parameter: it's added at the end
=> sooner or later, you'll need to call "Change Method Signature" to
reorder the parameters.
Alain
Thomas Singer (MoTJ) wrote:
Forgot the smiley. ;)
--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Hello Alain,
Oh, I see, you're talking about the case when adding a parameter from within
a method's body. I don't like that one, since it doesn't update the references
and I have to hunt down all the compile errors after that.
But the intention that pops up when adding a parameter in a method invocation
does bring up the change method signature dialog, so I tend to use it more
often.
Andrei