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

Bug 30161

Summary: Source>Surround with try/catch does not allow refining an existing try/catch block [quick assist]
Product: [Eclipse Project] JDT Reporter: Simon Tardell <simon>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 Keywords: helpwanted
Version: 2.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Simon Tardell CLA 2003-01-24 06:37:28 EST
If you have a piece of code like this:

try{
 doSomething();
 doSomethingElse();
}catch(Exception e){...}

where doSomething and doSomethingElse declares some 
exceptions, "Source>Surround with try/catch" will not add catch clauses to the 
existing try/catch.
Comment 1 Dirk Baeumer CLA 2003-01-24 07:37:01 EST
You can do this using quick fix. It provides a fix add a catch block to an 
existing try statement.

Comment 2 Simon Tardell CLA 2003-01-24 07:58:37 EST
No. QuickFixes are only available if the exception is not caught. In the 
example it is caught by catching the mother-of-all-exceptions. 
Comment 3 Dirk Baeumer CLA 2003-01-24 08:53:47 EST
You are correct !
Comment 4 Dirk Baeumer CLA 2003-04-25 06:56:31 EDT
This is more a quick assist feature then a refactoring. Currently no action 
planned for 3.0 until we get external help.
Comment 5 Dirk Baeumer CLA 2005-11-28 05:04:21 EST
Reopening...
Comment 6 Dirk Baeumer CLA 2005-11-28 05:05:31 EST
This got fix a long time ago...
Comment 7 Dirk Baeumer CLA 2005-11-28 05:06:17 EST
Reopening... (worng bug)
Comment 8 Dirk Baeumer CLA 2005-11-28 05:06:33 EST
.
Comment 9 Eclipse Webmaster CLA 2009-08-30 02:35:41 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.