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 73805 - Uncompilable panel in default package
Summary: Uncompilable panel in default package
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords:
: 67994 71952 72015 74312 74662 75093 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-21 12:45 UTC by Jaromir Uhrik
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 Jaromir Uhrik 2006-03-21 12:45:17 UTC
[release 5.0 fcs; JDK 1.5.0]
Steps to reproduce:
1.Create new JPanel in default package of the J2SE project
2.Place JTextField in the top left corner
3.Switch from Design view to Source view
4.Add a call to a non-existing method to the constructor's body last line
"nonExisting();"
5.Save the file
6.Let the cursor is on the line with non-existing method call 
7.Push Alt+Enter and then Enter - the following code is there in class as a
guarded block:
-------------------------------------%<--------------------------------
    // Variables declaration - do not mo
    private void nonExisting() {
        throw new UnsupportedOperationException("Not yet implemented");
    }
dify
    private javax.swing.JTextField jTextField1;
    // End of variables declaration    
-------------------------------------%<--------------------------------
The code is uncompilable then and it is not possible to make the code compilable
because the error is in guarded block - this is why this issue has the highest
priority.
Comment 1 Jan Stola 2006-03-23 11:03:35 UTC
Reassigning to java. Note that this seems to be a duplicate of issue 58816
that has been marked as fixed because we (form guys) have changed the code
generation according to pflaska's suggestion.
Comment 2 Jan Becicka 2006-03-30 11:52:26 UTC
This issue is not related to issue 58816 but rather to issue 67994.
Comment 3 Jan Becicka 2006-03-30 16:02:43 UTC
The problem is in saving garded sections.
We will fix it for 5.5.
Comment 4 Jan Becicka 2006-03-30 16:06:47 UTC
*** Issue 67994 has been marked as a duplicate of this issue. ***
Comment 5 Jiri Prox 2006-04-03 16:02:18 UTC
*** Issue 74312 has been marked as a duplicate of this issue. ***
Comment 6 Jan Becicka 2006-04-06 08:36:26 UTC
This problem happens, when new guarded block is saved into the file. The real
fix would be risky. It would require to implement logic to add spaces into
document which correspond to guraded markers in files.
We implemented workaround which reloads the file right after the document with
new guarded block is saved.
Checking in JavaEditor.java;
/cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v  <--  JavaEditor.java
new revision: 1.206; previous revision: 1.205
done
Comment 7 Jaromir Uhrik 2006-04-07 08:29:52 UTC
Verified in dev build #200604061800.
Comment 8 Jan Becicka 2006-04-07 09:04:14 UTC
Fixed in release_55
Checking in JavaEditor.java;
/cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v  <--  JavaEditor.java
new revision: 1.199.2.2.2.1; previous revision: 1.199.2.2
done
Comment 9 Jiri Prox 2006-04-10 12:10:41 UTC
*** Issue 74662 has been marked as a duplicate of this issue. ***
Comment 10 Jan Becicka 2006-05-05 08:56:33 UTC
*** Issue 71952 has been marked as a duplicate of this issue. ***
Comment 11 Jan Becicka 2006-05-05 13:31:39 UTC
*** Issue 72015 has been marked as a duplicate of this issue. ***
Comment 12 Jan Becicka 2006-05-05 13:54:15 UTC
*** Issue 74590 has been marked as a duplicate of this issue. ***
Comment 13 Jan Becicka 2006-05-05 15:17:35 UTC
*** Issue 75093 has been marked as a duplicate of this issue. ***