Automatic generation of inline comments during Extract Method [message #244938] |
Wed, 27 June 2007 12:27  |
Eclipse User |
|
|
|
Hi,
When I refactor a piece of code using Refactor -->Extract Method, I want
some
default inline comments.
For e.g. lets say i have some code
System.out.println("Hi");
if I refactor the above code to a new method MyMethod. I want some inline
comments to appear as shown below
public void myMethod(){
// begin-some-comment
System.out.println("Hi");
// end-some-comment
}
I tried using code templates,and other options in Preferences but I cant
get this for refactored methods.
Appreciate any help. If this is the wrong group or if there is material
online ( i have googled but no success) ,please direct me.
Regards,
Rajiv
|
|
|
Re: Automatic generation of inline comments during Extract Method [message #245377 is a reply to message #244938] |
Mon, 09 July 2007 06:19  |
Eclipse User |
|
|
|
Originally posted by: benno_baumgartner.ch.ibm.com
Rajiv Abraham wrote:
> Hi,
>
> When I refactor a piece of code using Refactor -->Extract Method, I want
> some default inline comments.
>
>
> For e.g. lets say i have some code
>
> System.out.println("Hi");
>
>
> if I refactor the above code to a new method MyMethod. I want some
> inline comments to appear as shown below
>
> public void myMethod(){
> // begin-some-comment
>
> System.out.println("Hi");
>
> // end-some-comment
>
> }
>
> I tried using code templates,and other options in Preferences but I cant
> get this for refactored methods.
>
> Appreciate any help. If this is the wrong group or if there is material
> online ( i have googled but no success) ,please direct me.
>
> Regards,
> Rajiv
>
>
>
IMHO this is a bug, extract method should honor the method body
template. Please file a bug against JDT/UI with steps to reproduce.
Thanks
Benno
|
|
|
Powered by
FUDForum. Page generated in 0.03480 seconds