Name prefix/suffix functionality

Any response from IntelliJ folks would be great.

So I filed several tracker bugs on the way that I think this
functionality is supposed to behave. The bugs are as follows. They were
marked (it seems to me) inconsistently, so I just wanted to open this up
to the list (I previously started a thread on this last week).

11088 Introduce parameter refactoring does not use name prefix/suffix
Do not fix
11089 Introduce constant refactoring does not use name prefix and suffix
Do not fix
11090 Introduce Variable refactoring does not use name prefix and suffix
Do not fix
11091 Create Method intention does not use name prefix and suffix for
parameters
Normal Open Aurora

Basically, the way I assume this feature is supposed to work is that any
time a variable is suggested to you (or automatically assigned a name),
the name prefixes and suffixes should be used. The only additional
functionality I can determine is that when generating accessor methods
for class members with prefixes and suffixes, those accessor methods
should not include the prefix and suffix of the member. For example:

private int m_number_m = 1;

Generated accessors:

public int getNumber (){ ... }
public void setNumber (int number){ ... }

Can someone please clatify this for me???!!

Thanks
Peter

4 comments

Can someone please clatify this for me???!!


Yes, basically it's as you wrote just now:

Idea should always suggest (and/or remove) the prefix/suffix when
appropriate. If the suggestion is overridden, idea should respect the new
name.

If you think that any of your requests was closed a little to quickly :)
You can always post another message to the request to reopen it.

Note that with this kind of suggestions, a code example will make the
request much more clear and reduce possible misunderstandings between the
poster and the developers.




0

Thanks Carlos, I will go ahead and do that, just wanted someone else
from the group to confirm that I was correct in my understanding of the
feature.

Peter

Carlos Costa e Silva wrote:
>>Can someone please clatify this for me???!!


Yes, basically it's as you wrote just now:

Idea should always suggest (and/or remove) the prefix/suffix when
appropriate. If the suggestion is overridden, idea should respect the new
name.

If you think that any of your requests was closed a little to quickly :)
You can always post another message to the request to reopen it.

Note that with this kind of suggestions, a code example will make the
request much more clear and reduce possible misunderstandings between the
poster and the developers.




0

Peter,

Requests which you submitted were closed as "Do not fix". See the comment
for #11090.

P.S. Please submit only one request when a few issues are obviously the same
one.

--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Peter Mularien" <pmularien@dNeOpSlPoAyM.com> wrote in message
news:b6rvb3$v85$2@is.intellij.net...

Any response from IntelliJ folks would be great.

>

So I filed several tracker bugs on the way that I think this
functionality is supposed to behave. The bugs are as follows. They were
marked (it seems to me) inconsistently, so I just wanted to open this up
to the list (I previously started a thread on this last week).

>

11088 Introduce parameter refactoring does not use name prefix/suffix
Do not fix
11089 Introduce constant refactoring does not use name prefix and suffix
Do not fix
11090 Introduce Variable refactoring does not use name prefix and suffix
Do not fix
11091 Create Method intention does not use name prefix and suffix for
parameters
Normal Open Aurora

>

Basically, the way I assume this feature is supposed to work is that any
time a variable is suggested to you (or automatically assigned a name),
the name prefixes and suffixes should be used. The only additional
functionality I can determine is that when generating accessor methods
for class members with prefixes and suffixes, those accessor methods
should not include the prefix and suffix of the member. For example:

>

private int m_number_m = 1;

>

Generated accessors:

>

public int getNumber (){ ... }
public void setNumber (int number){ ... }

>

Can someone please clatify this for me???!!

>

Thanks
Peter

>


0

Hi Valentin -

Requests which you submitted were closed as "Do not fix". See the comment
for #11090.


I know that the requests were closed as Do Not Fix, however I think that
the closer was incorrect. Here is the closing comment:

"you type NAME of a variable in a dialog. IDEA accepts whatever you type
as actual variable name. However, IDEA suggests variable name according
to conventions."

I believe that the intended functionality is that the suggestion
should incorporate the appropriate prefix and suffix. I agree that
whatever you type should be what is actually used for the refactoring,
but the suggestion in the dialog itself should be prefixed and suffixed
appropriately. I'll go ahead and update the bug(s) with this comment as
well.

P.S. Please submit only one request when a few issues are obviously the same
one.


I will follow this with you guys in the future, I know various places
where I've worked have had exactly the opposite policy. The reason being
that it is not necessarily obvious that it is the same root cause, and
it is easier for QA to verify that all the cases have been resolved.

Cheers -
Peter

0

Please sign in to leave a comment.