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 79569 - SurroundWithTryCatch to handle partial selections?
Summary: SurroundWithTryCatch to handle partial selections?
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-03 08:27 UTC by ivan
Modified: 2010-09-23 08:37 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2006-07-03 08:27:55 UTC
The editor actions which indent and comment code will accept a multi-line
selection which starts and ends in middles of lines, but SurroundWithTryCatch
doesn't.

If you have a single cursor and no selection SurroundWithTryCatch will
do it's thing on the one line the selection is in.

If you have more than one line, having gotten used to how indent
and comment work I figured a sloppy selection would do, but I got an error
    Cannot surround selected block with try-catch.

When I carefully selected the whole two lines it worked. 
I wold be more useful if it cold handle sloppy selection like indent
and comment ... seems like an opportunity for some code factoring.