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 251678 - Highlight switch with missing cases
Summary: Highlight switch with missing cases
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-06 16:38 UTC by cezariusz
Modified: 2016-07-13 19:26 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
No hint in NetBeans (7.82 KB, image/png)
2015-04-06 16:39 UTC, cezariusz
Details
Switch hint in Eclipse (16.20 KB, image/png)
2015-04-06 16:40 UTC, cezariusz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2015-04-06 16:38:46 UTC
The switch statement with missing cases (on enum) should be highlighted (underlined), even when not at the switch line.
See the screenshots from NetBeans and Eclipse.
Comment 1 cezariusz 2015-04-06 16:39:42 UTC
Created attachment 153059 [details]
No hint in NetBeans
Comment 2 cezariusz 2015-04-06 16:40:10 UTC
Created attachment 153060 [details]
Switch hint in Eclipse
Comment 3 Jiri Prox 2015-04-07 09:15:49 UTC
In NB there is hint to add missing cases, but by default it is visible only when cursor is located over the 'switch' keyword
Comment 4 cezariusz 2015-04-07 21:14:56 UTC
(In reply to Jiri Prox from comment #3)
> In NB there is hint to add missing cases, but by default it is visible only
> when cursor is located over the 'switch' keyword

Yes, I found out that when I was preparing this report. But it's hardly visible and usually not even noticed because:
1. It doesn't even have an exclamation mark overlay, just a plain bulb icon
2. It's not underlined
3. The same bulb icon appears on various occasions when no action is necessary, for example on class name (to create a subclass or a test class), on "if" keyword (to invert if, and it has the exclamation mark overlay for some reason).