13 comments
Comment actions Permalink

Michael Damberger wrote:

mostly I want to "create field for parameter" etc.,
but not remove ...


+10

0
Comment actions Permalink

While we are at it, I often want to create the field, even when the
parameter is already used for something else, e.g. our
"QAssert.assertNotNull(obj)"-checks.

Tom

0
Comment actions Permalink

+10

Sascha Weinreuter wrote:

Michael Damberger wrote:

>> mostly I want to "create field for parameter" etc.,
>> but not remove ...


+10

0
Comment actions Permalink

+10

Thomas Singer (MoTJ) wrote:

While we are at it, I often want to create the field, even when the
parameter is already used for something else, e.g. our
"QAssert.assertNotNull(obj)"-checks.

Tom

0
Comment actions Permalink

Yes. Yes. Yes. Pleeeeaaaase.
I always feel so stupid having just typed a new parameter, invoking the intention and seeing my parameter gone again.

Some while ago "Create field for parameter" used to be the first intention...

0
Comment actions Permalink

Thomas Singer (MoTJ) wrote:

While we are at it, I often want to create the field, even when the
parameter is already used for something else, e.g. our
"QAssert.assertNotNull(obj)"-checks.


If the parameter is already used, can't you just use the Introduce Field
refactoring?

Bas

0
Comment actions Permalink

Fixed.

"Michael Damberger" <michael.damberger@t-online.de> wrote in message
news:6743426.1109108360959.JavaMail.itn@is.intellij.net...

mostly I want to "create field for parameter" etc.,
but not remove ...

>
>


0
Comment actions Permalink

Don't know, I have not tried - will do next time. But the intention
would be fine, too...

Tom

0
Comment actions Permalink

If we're talking about the list of intentions that shows up on unused parameters, -1: remove the unused parameter is what I usually want to do with it. This happens mostly as a side effect of some refactoring (removing parameters from called methods).

I almost never add a new parameter by manually typing in the method declaration. The "Introduce Parameter" intention that pops on unresolved references is way nicer.

0
Comment actions Permalink

We are talking about the list of intentions that shows up on unused
parameters in the constructor... in this case 99% of the time I want
to add a field for the parameter, not get rid of it. Elsewhere it's the
opposite, but then elsewhere you don't have an intention for create
field anyway.

N.

Marcus Brito wrote:

If we're talking about the list of intentions that shows up on unused parameters, -1: remove the unused parameter is what I usually want to do with it. This happens mostly as a side effect of some refactoring (removing parameters from called methods).

I almost never add a new parameter by manually typing in the method declaration. The "Introduce Parameter" intention that pops on unresolved references is way nicer.

0
Comment actions Permalink

Oh no, broken again in 3341.
Can you please fix it again?

0

Please sign in to leave a comment.