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 226299 - Contains Main Class Badge does not show.
Summary: Contains Main Class Badge does not show.
Status: RESOLVED DUPLICATE of bug 189268
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 01:29 UTC by MackSix
Modified: 2015-09-18 17:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Project to use for reproduction. (14.81 KB, application/zip)
2013-02-19 01:29 UTC, MackSix
Details
Source to copy & paste. (1.50 KB, text/plain)
2013-02-19 01:30 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2013-02-19 01:29:54 UTC
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.
Comment 1 MackSix 2013-02-19 01:30:44 UTC
Created attachment 131551 [details]
Source to copy & paste.
Comment 2 ebakke 2013-04-02 20:39:17 UTC
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).
Comment 3 MackSix 2015-09-18 17:00:21 UTC

*** This bug has been marked as a duplicate of bug 189268 ***