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 224654 - WARNING on current line - visualization
Summary: WARNING on current line - visualization
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-09 14:43 UTC by Ondrej Brejla
Modified: 2013-04-03 14:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Brejla 2013-01-09 14:43:41 UTC
I think that if it's a "warning" then it should behave similarly to WARNING severity - yellow flags, underlined and triangle with exclamation mark.

Proposed fix is to change HintSeverity.java:60 to return Severity.VERIFIER;

Thanks.
Comment 1 Ondrej Brejla 2013-02-06 09:51:32 UTC
Please, can you integrate it asap? It really annoys me. Right now I spent a lot of time debugging my hints code, because I thought that they don't work...I just didn't see any yellow wave line :) Thanks in advance!
Comment 2 Svata Dedic 2013-04-03 11:09:49 UTC
Could you please better describe the use - case and what do you want to achieve ? Warnings-on-line currently do not use wavy underlining. Typically because warnings-on-line (better description: intentions or hints) relate to the current caret position, so the location is (should be) implicitly known to the user.

I think that better approach is to agree that "Warning on Current Line" is a poor term and should be fixed or even withdrawn; but we need to do that consistently with Java since it uses the same terminology.

During testing, I've found a possible defect which ma contribute to the confusion: although the severity of the produced hint is "warning on current line", it is produced and returned to CSL infrastructure even though the caret position is somewhere else. 
The API contract, however is build so that the PHP provider should check and return just suggestions applicable to the current caret's position.
Comment 3 Ondrej Brejla 2013-04-03 11:20:22 UTC
If it's Warning on Current Line, then it should be visualised like a warning - wavy underlining and with a yellow stipe in gutter.

And yes, probably PHP hints returns not just warning under caret, but all warnings on LINE where the caret is, because that's what user expects from "Warning on Current Line" option.

Probably it would be the best solution to rename that "option label" to something else. Avoid using "Line" and "Warning"...probably "Intentions Under Caret" ? Or something like that...?
Comment 4 Svata Dedic 2013-04-03 14:31:22 UTC
OK ... so we've identified some bugs in PHP, which made the suggestions to appear +- randomly. I would prefer not to change the visual appearance of the "current line warning" hints, as they are consistent with similar feature in Java hints. Instead, I re-labelled the setting, so it now reads "Suggestion for current line".

I admin that the CSL hint support is ugly. Very ugly. SPI implementors are required to call back and basically enforce all the logic themselves, which is a severe design defect.

Expect an overhaul, maybe in the next release.
Comment 5 Svata Dedic 2013-04-03 14:35:57 UTC
Fixed by http://hg.netbeans.org/jet-main/rev/9eac999f00c7