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 78750 - Strange behaviour of Java hints
Summary: Strange behaviour of Java hints
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-21 10:51 UTC by Jiri Kovalsky
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception thrown when "Surround with ..." Java hint is used in guarded code (511 bytes, text/plain)
2006-06-21 10:52 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2006-06-21 10:51:02 UTC
Development build #200606210200 of NetBeans 5.5
Windows XP, RC build #87 of JDK 1.6

Description:
============
To be honest I don't know what should be correct behaviour but on the other hand
I don't know why IDE offers something that can't be used. I mean the fact that
Java hints are available even in the guarded code of GUI forms. This obviously
leads to strange situations and throws exceptions.

Steps to reproduce:
===================
1. Create new Java application project and new JFrame class inside.
2. Select the JFrame in design mode, switch to "Events" properties and generate
e.g. "formAncestorMoved" event handler method.
3. Type the following code to its body:

   throw new Exception();

4. After a while you are allowed to press ALT+Enter. Use "Add throws clause..."
hint. The statement will be added to method signature and you now can't delete
it. Only "Edit|Undo" works.
5. Use error stripe to move to another syntax error in "Generated Code" fold.
6. Use ALT+Enter again but choose "Surround with try-catch block" hint now.
7. Below attached exception will be thrown.
Comment 1 Jiri Kovalsky 2006-06-21 10:52:22 UTC
Created attachment 31264 [details]
Exception thrown when "Surround with ..." Java hint is used in guarded code
Comment 2 Jan Stola 2006-08-23 14:21:00 UTC
Reassigning to java module for evaluation.
Comment 3 Jan Becicka 2006-10-26 16:27:53 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 4 Quality Engineering 2007-09-20 09:55:10 UTC
Reorganization of java component