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.
Created attachment 131550 [details] Project to use for reproduction. 1. Open attached project in NetBeans. 2. Add New Java Class to exsisting package. 3. Open attached textfile and copy & paste content to the NewClass.java file in the NetBeans editor, replacing existing text. 4. Scroll to the top and click on error light bulb and create package declaration. 5. Save file. 6. Type Ctrl+R to rename NewClass.java to "NonGenDemo.java". 7. Notice file icon in the Project Window does not show NonGenDemo.java having a main class. Expected: NonGenDemo.java icon shows having main class. Workaround: Restart NetBeans. Product Version: NetBeans IDE 7.3 (Build 201302132200) Java: 1.7.0_13; Java HotSpot(TM) 64-Bit Server VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_13-b20 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) This may be a duplicate of issue 189268.
Created attachment 131551 [details] Source to copy & paste.
I'm observing main class badges missing in various situations as well. This seems to be new in 7.3 for me at least. Here's one way to trigger the bug that worked for me three times in a row: 1) In an already-open java project, create a new Java file. 2) Put "public static void main(String args[]) {}" in the class and save. The icon in the editor tab for the java file now a main class badge, as does the icon in the project explorer, and the class can be run. 3) Close the editor tab for the java file. 4) Reopen the editor for the java file. While the class is still runnable and the file still has the badge in the explorer view, the main class badge is now missing from the editor tab icon. The icon is also missing from the Ctrl+Tab menu (which is annoying, since I often use Ctrl+Tab to quickly go back to a main class while having a lot of other files open, and the lack of a main class badge makes it hard to quickly see where the main class editor is in the Ctrl+Tab list).
*** This bug has been marked as a duplicate of bug 189268 ***