Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333226

Summary: [quick assist] move selected variable declaration outside of a block
Product: [Eclipse Project] JDT Reporter: Sethu <writetosethu>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: deepakazad, writetosethu
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Sethu CLA 2010-12-27 03:05:22 EST
Build Identifier: 20100917-0705

Very often we face a scenario where we declare and use variables inside a block such as a try block. We then later realise that oh! I need to close this/these variable(s) in the finally block. We then have to copy and place only the declaration of these variables above the try. Then we can use these variables in the finally block to close it. It would be great if we had a refactoring tool to say move the variable declaration above by one block or two blocks or a number of blocks that we specify. 

Reproducible: Always

Steps to Reproduce:
This is an enhancement
Comment 1 Deepak Azad CLA 2010-12-27 05:23:43 EST
Note that you can use the trick from bug 218622 comment 4.

*** This bug has been marked as a duplicate of bug 218622 ***