On 5/15/07, Maarten Coene <[EMAIL PROTECTED]> wrote:

Can't you do this in Eclipse by using a simple Find/Replace with regulare
expressions?

For instance: replace pattern "( |\.)_" with "\1".
I didn't test it out though, so I'm not sure it will work...


Using a regular expression search and replace could do the trick... I've
tried in the current Ivy code base, and I got 170 errors after 6000+
replacements. Indeed, we regularly use the underscore to distinguish
attributes from variables. In the best case we have a compilation error
(when the type of the variable is not compatible with the type of the
attribute), in other cases we have a warning (status = status; ) and in the
remaining cases we have nothing to help except the unit test and our fingers
crossed :-)

So I'm not in favor of this change unless we have a tool able to do the
refactoring with java code knowledge, to ensure it won't introduce any
problem.

Xavier

Maarten


----- Original Message ----
From: Xavier Hanin <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, May 14, 2007 7:59:18 PM
Subject: Re: coding conventions?

On 5/14/07, Stephane Bailliez <[EMAIL PROTECTED]> wrote:
>
> Xavier Hanin wrote:
> >
> > The main point is there, renaming every thing wouldn't be really easy.
> > Now
>
> That's because you use Eclipse which sucks for refactoring ;)


Just curious, can you really rename all attributes in all classes by
removing the leading _ with IDEA in one operation?

Xavier

-- stephane
>



--
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/







____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL




--
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Reply via email to