This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 60923 - Surround with try-catch cursor position could be improved
Summary: Surround with try-catch cursor position could be improved
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P4 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 61641 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-13 14:10 UTC by Roman Strobl
Modified: 2016-07-07 07:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Strobl 2005-07-13 14:10:16 UTC
[NetBeans 200507061800; WinXP; JDK 1.5.0_04]

When I surround with try-catch an exception, I get following code:

        try {
            throw new Exception();
        } catch (Exception e) {
       |}

The | character denotes cursor position. I believe it would be better to get:

        try {
            throw new Exception();
        } catch (Exception e) {
            |
        }

In most cases I am going to execute some code in the catch block and the place
designated by | is more natural for placing this code.
Comment 1 Rastislav Komara 2009-02-03 10:56:03 UTC
Overtake.
Comment 2 Jan Lahoda 2009-08-20 09:59:53 UTC
Reassigning all moonko's java/source bugs to myself.
Comment 3 dharkness 2012-09-12 19:42:57 UTC
*** Bug 61641 has been marked as a duplicate of this bug. ***
Comment 4 Martin Balin 2016-07-07 07:17:51 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss