Intended functionality of name prefix / suffix

I have been trying to use the name prefix and suffix feature of Aurora.
It doesn't appear (to me) to be working, but maybe I don't understand
what it's supposed to do.

I assume it is supposed to work like this:

Let's say my field prefix is "f_". I select some data and do the
refactoring "Introduce Field". IDEA should suggest the field name with
"f_" prefixed to the beginning.

Is this the way it's supposed to work? Maybe I'm dense, but if so, I
really don't see the usefulness of the feature. Can one of the IntelliJ
guys enlighten me?

Thanks
Peter

4 comments

(I think) It's used for when you do Alt-Ins to generate getters and setters, it strips off the post/prefix when generating the method names.

0

Peter Mularien wrote:

Let's say my field prefix is "f_". I select some data and do the
refactoring "Introduce Field". IDEA should suggest the field name with
"f_" prefixed to the beginning.


Yep that's what it does in IDEA 3.0.2. So I guess it must be a bug in
Aurora.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919

0

Ash Searle wrote:

(I think) It's used for when you do Alt-Ins to generate getters and setters, it strips off the post/prefix when generating the method names.


Thanks, this particular thing does seem to work properly in Aurora.

Gordon Tyler wrote:
> Yep that's what it does in IDEA 3.0.2. So I guess it must be a bug in
> Aurora.

OK, this (and other refactorings) do not do anything with the name
prefixes and suffixes. I will file some bugs on this.

Thanks
Peter

0

So I filed several tracker bugs on the way that I think this
functionality is supposed to behave. The bugs are as follows:

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


Peter Mularien wrote:

I have been trying to use the name prefix and suffix feature of Aurora.
It doesn't appear (to me) to be working, but maybe I don't understand
what it's supposed to do.

I assume it is supposed to work like this:

Let's say my field prefix is "f_". I select some data and do the
refactoring "Introduce Field". IDEA should suggest the field name with
"f_" prefixed to the beginning.

Is this the way it's supposed to work? Maybe I'm dense, but if so, I
really don't see the usefulness of the feature. Can one of the IntelliJ
guys enlighten me?

Thanks
Peter


0

Please sign in to leave a comment.