Depends on the block code.  If there is a return in there, for instance, you
can't extract it as a new method.  Recent builds of IDEA (since #506 iirc)
pop up a dialog explaining why the refactoring isn't possible.  Older builds
just ignore the request.

Cheers,
Dan/tastapod

> -----Original Message-----
> From: Jonas Kvarnstr�m [mailto:[EMAIL PROTECTED]]
> Sent: 25 October 2001 14:50
> To: [EMAIL PROTECTED]
> Subject: [Eap-list] Extract Method fails for block
> 
> 
> Yesterday I wanted to extract a block of code within braces { 
> ... } to a 
> method.  I selected the entire block, including the braces, and IDEA 
> refused to let me make that code into a method.  I had to select the 
> inner part of the block, extract a method, and then manually 
> remove the 
> braces.  Is this a bug, or are there reasons why replacing a 
> brace block 
> with a single method call might not be a good idea?
> 
> 
> 
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list
> 


***************************************************************************************
This email and any files transmitted with it are confidential and intendeds
 olely for the use of the individual or entity to whom they are addressed.I
 f you have received this email in error please notify [EMAIL PROTECTED] 
immediately.

This footnote also confirms that this email message has been swept for thep
 resence of computer viruses.
***************************************************************************************

_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to