Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Automatic generation of inline comments during Extract Method
Automatic generation of inline comments during Extract Method [message #244938] Wed, 27 June 2007 16:27 Go to next message
Rajiv Abraham is currently offline Rajiv AbrahamFriend
Messages: 1
Registered: July 2009
Junior Member
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 10:19 Go to previous message
Eclipse UserFriend
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
Previous Topic:Start with JDT/AST documentation (tutorial)
Next Topic:Non-modal dialog
Goto Forum:
  


Current Time: Sun Sep 01 00:16:04 GMT 2024

Powered by FUDForum. Page generated in 0.02893 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top