Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] Re: idea for refactoring

I think I was a bit unclear un this. It's not in de 1.5/5 spec, but it would be one of those things that would be nice to have.

James Langley wrote:

Slightly off topic I know, but I've been looking at the J2SE 5 specs and
I can't find any mention of optional parameters.  Do you know for sure
that they're going to be in J2SE 5? If so, do either of you happen to
have a link to a description of the feature?

Thanks,

James

-----Original Message-----
From: jdt-dev-admin@xxxxxxxxxxx [mailto:jdt-dev-admin@xxxxxxxxxxx] On
Behalf Of Dan Allen
Sent: 28 July 2004 21:08
To: jdt-dev@xxxxxxxxxxx
Subject: [jdt-dev] Re: idea for refactoring

While I agree that optional parameters will be a nice feature in 1.5,
I still think that my request is a seperate issue.  It just may be
that the same functional code is called from different environments,
requiring different methods...but ultimately a central method is
called.  If you open up org.apache.struts.util.RequestUtils you see a
lot of places that have this type of call hierarchy.  Essentially, you
want to be able to refactor to create a delegation method.

It looks like this already exists under "Source > Generate Delegate
Method"...

Dan

You mean like
void test(int a, int b, int c = 2, boolean dosomething = true) ?

I think that should be a language feature in 1.5

Dan Allen wrote:

While I was sitting here coding today, I had, what I consider to
be,
an excellent idea for a refactoring option.  When creating a
method,
it is often times necessary to create several "optional" methods
with
different signatures which in turn call the primary method.
Therefore, I propose a refactoring named:

generate alternate caller method

or something to that effect.  It would ask for fields to be
accepted
and which of those fields will be used to call the primary method
and
then generate the delegating method.

Thoughts?
_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-dev




--__--__--

_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-dev

End of jdt-dev Digest

_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-dev
_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-dev





Back to the top