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 195753 - Frustrating highlighting of missing semi-colons
Summary: Frustrating highlighting of missing semi-colons
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords: API, UI
Depends on:
Blocks:
 
Reported: 2011-02-21 11:57 UTC by aybiss
Modified: 2016-07-07 07:28 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aybiss 2011-02-21 11:57:29 UTC
When typing a new line of code, the semicolon is normally the last thing typed. NetBeans helpfully tells you that the line is wrong until you add it, great!

The trouble is, it highlights the entire statement, so you find yourself doublechecking things rather than just adding a ';'. It would be great if the red squiggly was just at the end of the line.

Furthermore, shouldn't it be an obvious candidate for code completion? If I'm bashing enter madly closing quotes and brackets, I'd expect it wouldn't be too much trouble to allow me to bash it one more time and get a semicolon at the end of a completed statement. It wouldn't ALWAYS be what you want, but no hint is.

So rather than me learning to type ';' before I start each line, I hope that within the existing framework for syntax highlighting and code completion this wouldn't be too tricky a job.

Cheers guys.

Product Version = NetBeans IDE 6.9.1 (Build 201011082200)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_22
Runtime = Java HotSpot(TM) Client VM 17.1-b03
Comment 1 Jan Lahoda 2011-02-23 09:45:33 UTC
I agree that the missing semicolon error underline should ideally be only at the very end of the line. The trouble is that this is not reasonably doable using current NB internal APIs.

Note that there is a Ctrl-; action, that adds the semicolon at the end of the current line.
Comment 2 aybiss 2011-03-09 02:46:41 UTC
moved to 7.0, since i now run that and it is still an issue there.
Comment 3 David Strupl 2012-12-17 10:29:26 UTC
This is an enhancement request as the current behaviour is intended (for marking this error).

I have done a research what the other IDEs do:

1. IDEA: underline the first (non-existent) character at the end of the line
2. Eclipse: underline the last character on the line
3. NetBeans (as mentioned here) underlines the whole line

I think that the IDEA way looks the best (for this type of error). But as I mentioned this is not a bug per se. I have added Mila on Cc: to consider the required API change.
Comment 4 Martin Balin 2016-07-07 07:28:08 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss