As I use [Extract variable] to write fresh code, and not only refactor existing
one,

I'd like [Extract variable] to let me control the insertion point of the
extracted variable, when the cursor is in an enclosed (between braces) area
(try/catch, if/else, ..).


Example: extracting "session.getDb()" in :

     try {
         session.getDb()
     }
     catch {     }


produced the following code

     try {
         Database db = session.getDb();
     }
     catch {     }


while I needed :

     Database db = null ;
     try {
         db = session.getDb();
     }
     catch {     }

because my final goal is :


     Database db = null ;
     try {
         db = session.getDb();
         db.begin();
            ...
         db.commit();
     }
     catch (SomeException ex) {
         db.rollback() ;
     }


Alain Ravet

__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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

Reply via email to