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 135787 - syntax error (unexpected ')') is not highlighted
Summary: syntax error (unexpected ')') is not highlighted
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-26 10:21 UTC by Victoria Zhukovskaya
Modified: 2014-06-13 05:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
no syntax error hightlighting is present (40.42 KB, image/png)
2014-06-13 05:22 UTC, gameshas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victoria Zhukovskaya 2008-05-26 10:21:52 UTC
syntax error (unexpected ')') is not highlighted. (f.e)

Syntax errors are not colored  at all 
f. e.: $a=;
etc

Product Version: NetBeans IDE Dev (Build 2008-05-26_06-13-16)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
Comment 1 Petr Pisl 2008-05-26 17:10:43 UTC
This looks like a regression. 
Comment 2 Tomasz Slota 2008-05-26 17:52:44 UTC
Possibly it's a regression introduced by the fact I started to use the GSF Hints API. I already asked Tor about, it should be easy to fix if it is really the reason.
Comment 3 Torbjorn Norbye 2008-05-26 18:27:04 UTC
My guess is that your HintProvider didn't return its -unhandled- errors in the "unhandled" parameter of the
computeErrors method. I haven't looked at your code (it's a vacation day in the US today) but if you just stubbed that
method out, make sure you take the CompilationInfo's getDiagnostics/getErrors list and addAll into the unhandled
parameter. The idea is that the computeErrors method gets to provide hints that let you -fix- errors, and the ones you
don't fix you return as unhandled.  I think I should do something in GSF to help detect this usage error -- e.g. if
there ARE errors, and a HintsProvider returns both an empty hints list AND an empty unhandled list, it's probably
incorrect and this should generate a warning to the GSF client.
Comment 4 Torbjorn Norbye 2008-05-27 04:25:14 UTC
I checked in c7f75ef3240e which will probably fix this issue.
Comment 5 Tomasz Slota 2008-05-27 09:44:23 UTC
Yes, the issue is fixed, thank you Tor.
Comment 6 Victoria Zhukovskaya 2008-05-27 09:53:34 UTC
verified 

Product Version: NetBeans IDE Dev (Build 2008-05-27_04-13-29)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
Comment 7 gameshas 2014-06-13 05:19:24 UTC
The issue is back in
Product Version: NetBeans IDE 8.0 (Build 201403101706)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 1.1

if you place an additional ), for example:
$input->value($this->generator()->getTestString()));

there is one extra ), this gives syntax error, but editor previously highlighted those in red, now it does not at all. But a Red exclamation mark appears on the file tab, that indicates that something is wrong and if i run a file i get a syntax error
Parse error: syntax error, unexpected ')' in ...\tests\PHPUnit_Extensions_Tests_Selenium2TestCase.php on line 514
Comment 8 gameshas 2014-06-13 05:22:45 UTC
Created attachment 147656 [details]
no syntax error hightlighting is present
Comment 9 gameshas 2014-06-13 05:24:33 UTC
In fact no syntax errors are reported.
foreach($elements $b => as $input)

does not get highlighted also
Comment 10 Ondrej Brejla 2014-06-13 05:29:24 UTC
Do not reopen 6 years old issues. File a new one. Thanks.
Comment 11 Ondrej Brejla 2014-06-13 05:31:40 UTC
Especially if the problem is "works for me". I have whole line underlined with message "unexpected )" (probably your file is buggy and brackets "match" somehow...). Sorry.