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 60180 - Improve error messages from surround with try-catch
Summary: Improve error messages from surround with try-catch
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2005-06-17 10:19 UTC by Roman Strobl
Modified: 2005-09-05 10:01 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-06-17 10:19:02 UTC
[NetBeans 200506161800; WinXP; JDK 1.5.0_04]

We should probably improve the error message from surround with try-catch. I
propose not to use the "encapsulate" word as people may confuse it with
encapsulate fields. I would rather write:

Cannot surround selected block with try-catch.

This can also help user understand he needs to select a piece of code if he
wants to do surround with tc.

I think we should use similar visualisation as is used with Find dialog. I'm not
a big fan of the red color which is used there but user will mention the error.
At least we'll make it consistent with the find dialog.
Comment 1 Roman Strobl 2005-06-17 10:20:16 UTC
CCing Jano for his opinion. Thanks.
Comment 2 Jan Becicka 2005-08-23 15:55:46 UTC
Checking in editor/src/org/netbeans/modules/editor/java/JavaKit.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/JavaKit.java,v  <-- 
JavaKit.java
new revision: 1.16; previous revision: 1.15
done
Checking in javacore/src/org/netbeans/modules/javacore/Bundle.properties;
new revision: 1.19; previous revision: 1.18
Comment 3 Roman Strobl 2005-08-25 15:58:38 UTC
Verified. Hopefully we will improve the color schemes soon... (to make the red
less red) - but that's another issue.