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 257265 - Strange semantic code reading eroor. Depends on parts of javascript comment. You can delete diffrent parts of them and semantics highlighting gets back. Parts have no html tags, only spaces, commas, dots and russian letters.
Summary: Strange semantic code reading eroor. Depends on parts of javascript comment. ...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-23 04:54 UTC by Zon
Modified: 2016-08-18 13:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (266.22 KB, text/plain)
2015-12-23 04:54 UTC, Zon
Details
Code (1.58 KB, application/octet-stream)
2015-12-23 05:04 UTC, Zon
Details
Editor (116.89 KB, image/png)
2016-01-04 13:11 UTC, Petr Pisl
Details
Screenshot when it doesn't work. (59.56 KB, image/png)
2016-01-07 09:35 UTC, Zon
Details
Screenshot when it works. (60.87 KB, image/png)
2016-01-07 09:37 UTC, Zon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zon 2015-12-23 04:54:00 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201408251540)
Operating System = Linux version 3.5.0-51-generic running on amd64
Java; VM; Vendor = 1.8.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Comment 1 Zon 2015-12-23 04:54:04 UTC
Created attachment 157895 [details]
IDE log
Comment 2 Zon 2015-12-23 05:04:27 UTC
Created attachment 157896 [details]
Code
Comment 3 Zon 2015-12-23 05:26:06 UTC
Somehow it depends on comment length and separating the comment from previous object property with whitespace. Deleting any 2-3 lines from comment also helps.
Comment 4 Petr Pisl 2015-12-28 15:51:35 UTC
I can not somehow resolve what is wrong. When I try the attached source in NB8.1 and NB 8.0.2 I can not notice, what is wrong. Could you please be more specific. What error do you see?

Thanks
Comment 5 Zon 2015-12-30 20:04:05 UTC
This is not an error, but a bug that reduces functionality. The code is usually sematically evaluated by IDE (blue operators, violet global variables, highlighting selected variable across the code etc.) 

When comments before functions are long and functions are given separated with commas, then code evaluation breaks and you see plain text only. If you try formatting - it fails also and spoils code layout.

The solution is to put an empty line before function comment. Evaluation then recovers. But I still can't make my formatting settings leave such an empty line. So when you ask to format - these lines are removed and code layout is spoilt again.
Comment 6 Petr Pisl 2016-01-04 13:11:30 UTC
Created attachment 157983 [details]
Editor

The screenshot from my 8.1.
Comment 7 Petr Pisl 2016-01-04 13:12:47 UTC
I probably get it. I attached a screenshot with your source from my NB 8.1. It seems that everything is ok. Did you install a third party plugin?
Comment 8 Zon 2016-01-07 09:35:35 UTC
Created attachment 158040 [details]
Screenshot when it doesn't work.

Here's a screenshot when it doesn't work. Singleton not green, maskText not thick, Stream.gui.helper.Format not is String.  

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: Updates available to version NetBeans 8.0.2 Patch 2
Java: 1.7.0_60; Java HotSpot(TM) 64-Bit Server VM 24.60-b09
Runtime: Java(TM) SE Runtime Environment 1.7.0_60-b19
System: Linux version 3.5.0-51-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/zon/.netbeans/8.0
Cache directory: /home/zon/.cache/netbeans/8.0
Comment 9 Zon 2016-01-07 09:37:20 UTC
Created attachment 158041 [details]
Screenshot when it works.

Added a line after "singleton: true," and it's recognized now. Semantics are analyzed, colors appear.
Comment 10 Zon 2016-01-07 18:31:30 UTC
As for plugins - only standard ones are installed.
Comment 11 Petr Pisl 2016-08-18 13:13:06 UTC
The problem is fixed in dev build.