jiller / agentsmithplugin

Automatically exported from code.google.com/p/agentsmithplugin
0 stars 0 forks source link

Question: Adding name parts with renaming quick-fix? #128

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
(This is not an issue but a question, however, I cannot find any discussion
groups or boards here.)

I have defined a naming rule that forbids "Collection" in field, variable
and parameters names, which is also automatically removed by the renaming
quick-fix. See the attached file for the complete rule settings.

Now the question is: How can I define that a "s" should be appended by the
quick-fix, so that "itemCollection" becomes "items" instead of "item". As I
understand, the regex setting can be used to remove name parts - but how
and where can I insert name parts like that plural-s?

Original issue reported on code.google.com by kradew...@saz.net on 28 Apr 2009 at 7:21

Attachments:

GoogleCodeExporter commented 8 years ago
I think if you add forbidden suffix 'collection' and add obligatory suffix 's' 
it 
shall work. (regex rules can have suggestion if something have to be deleted 
only) 

Original comment by forever....@gmail.com on 28 Apr 2009 at 11:21

GoogleCodeExporter commented 8 years ago
But the obligatory suffix "x" would then be added to *all* fields, variables and
parameters, not just to those that contain or private a collection-like type.

I already saw that one can define a <remove> part in the regex which works quite
good. Do you know more about that, i.e. are there any other tricks provided?

Original comment by kradew...@saz.net on 29 Apr 2009 at 10:50