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 12097

Summary: rename main class sometimes renames file, sometimes doesn't
Product: java Reporter: Rochelle Raccah <raccah>
Component: UnsupportedAssignee: issues@java <issues>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: Sun   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:

Description Rochelle Raccah 2001-05-11 00:19:57 UTC
Sometimes renaming a class node renames the source node other times it doesn't. 
I can usually reproduce this after creating the node by copy/paste and opening
it in the editor or using NFT and immediately renaming it.  Once a node has this
problem, subsequent renames also don't work properly until IDE restart.
Comment 1 Jan Becicka 2001-05-18 08:38:39 UTC

*** This issue has been marked as a duplicate of 11878 ***
Comment 2 Rochelle Raccah 2001-05-18 17:26:00 UTC
Actually, I don't think this is a duplicate at all.  This is the case where I'm
renaming the main class and I *want* the source file renamed.  Sometimes it
works, sometimes it doesn't.  There are some instructions on how to reproduce
this (though it's not entirely easy) below.
Comment 3 Svata Dedic 2001-05-22 16:57:35 UTC
I've changed the implementation so that checks for and keeps track of changes 
of a "main" class, which is the first public class in the source whose name 
matches the source filename.
Marking as 3.2.1_CANDIDATE, but the fix is scattered throughout the class, so 
I can't guarantee it will be accepted.
Comment 4 Jan Becicka 2001-06-18 08:45:12 UTC
[dev-212] Verified
Comment 5 Jan Becicka 2001-06-19 15:19:40 UTC
[ffj30] Verified
Comment 6 Quality Engineering 2003-07-01 13:19:46 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.