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




17 comments
Comment actions Permalink

Andrei

>

Got to use this for the first time, and I love it.




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

0
Comment actions Permalink

Hello Alain,

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


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


0
Comment actions Permalink

Oh, and this is only for the latest build, 3229.

Andrei

Hello Alain,

>> 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

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




0
Comment actions Permalink

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

0
Comment actions Permalink

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...

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



0
Comment actions Permalink

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

0
Comment actions Permalink


"Alain Ravet" <alain.ravet@biz.tiscali.be> wrote in message
news:cvhp49$miv$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!!

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.


0
Comment actions Permalink

Though, as I'm indeed as lazy as you've guessed, I think that sometimes
being lazy is not a bad thing at all:)

BTW, we have a holiday in Russia and in JB today=)


0
Comment actions Permalink

Eugene

Seriously, I don't quite understand how the propagation of parameter
deletion should work.




I gave an example in the request:
http://www.jetbrains.net/jira/browse/IDEA-622

Alain

0
Comment actions Permalink

In article <cvhp49$miv$1@is.intellij.net>,
Alain Ravet <alain.ravet@biz.tiscali.be> wrote:

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.
;)


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

0
Comment actions Permalink

Eugene Vigdorchik (JetBrains) wrote:

BTW, we have a holiday in Russia and in JB today=)


We do? No one told me! I'm going home. Cya!

--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

You are in St. Peterburg? I though you were sitting in Praha?

Tom

0
Comment actions Permalink

Hello Thomas,

And why would that be a problem? I'm feeling like taking a day off myself,
just to support them. ;)

Andrei

You are in St. Peterburg? I though you were sitting in Praha?

Tom




0
Comment actions Permalink

Hello Alain,

And I rarely use "Change Method Signature" to add or remove
parameters,
as intentions are available.


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


0
Comment actions Permalink

Andrei Oprea wrote:

>
>> And I rarely use "Change Method Signature" to add or remove
>> parameters, as intentions are available.
>
>

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)?

>

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

0
Comment actions Permalink

Thomas Singer (MoTJ) wrote:

You are in St. Peterburg? I though you were sitting in Praha?

Tom


Forgot the smiley. ;)

--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Hello Alain,

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.


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


0

Please sign in to leave a comment.