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 252802 - javascript editor hints not working
Summary: javascript editor hints not working
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords: REGRESSION
: 253284 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-04 13:17 UTC by hgs
Modified: 2015-07-07 08:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (44.19 KB, text/plain)
2015-06-04 13:17 UTC, hgs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hgs 2015-06-04 13:17:20 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_55
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.55-b03


after last update the javascript editor hints no longer work, 
does not tag unused variables, o show usage of vars. or does not hint on useing == instead of == etc.
Comment 1 hgs 2015-06-04 13:17:26 UTC
Created attachment 154054 [details]
IDE log
Comment 2 Roman Svitanic 2015-06-04 13:45:53 UTC
Please make sure that you have JS hints enabled in Tools > Options > Editor > Hints > JavaScript. If JS hints are enabled and the issue is still reproducible, please try to run NetBeans with clean user directory [1].

I believe that this should help. If not, please reopen this issue and provide us more details, since I am not able to reproduce the issue. Thanks!

[1] http://wiki.netbeans.org/FaqAlternateUserdir
Comment 3 Petr Pisl 2015-06-04 13:49:04 UTC
If everything is ok, what Roman mentioned, could you provide example? Thanks
Comment 4 hgs 2015-06-04 14:35:53 UTC
JS hints are enabled.


executed

C:\Program Files\NetBeans 8.0\bin>netbeans64.exe --userdir d:\xxx

JS-Editor works fine as expected, however Netbenas 8.0 is up and running 
not Netbeans 8.0.2  


When runnig from my desktop shortcut with these settings

Targte: "C:\Program Files\NetBeans 8.0\bin\netbeans64.exe"
Execute in: "C:\Program Files\NetBeans 8.0"

netbeans 8.0.2 comes up but JS editor is not working.


confusing !

Petr Pisl is asking for example, please tell me what exactly do you need.
Comment 5 hgs 2015-06-04 16:18:34 UTC
It looks like the comment block below, at the very top of a JS file
is causing these problems. Seems that the starting pattern '/****'
causes this. 


/*****************************************************
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 'Software'), to deal in the Software without restriction, including
 without limitation the rights to use, copy, modify, merge, publish,
 distribute, sublicense, and/or sell copies of the Software, and to
 permit persons to whom the Software is furnished to do so, subject to
 the following conditions:
 
 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 ******************************************************/

function testtest(a, b, c) {
    'use strict';
    var unused, used;

    if (used == 0) {
        used = 1;
    }
    notDeclared=42;
    return 0;
}
Comment 6 Roman Svitanic 2015-06-05 11:30:13 UTC
Yesterday I have tried it only on the dev build and the issue is NOT present in the current DEV build, hints are shown, regardless of the file header (even with the same as mention in comment #5)

Product Version: NetBeans IDE Dev (Build 20150605-bc70ce340f9c)
Java: 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11
Runtime: Java(TM) SE Runtime Environment 1.7.0_80-b15
System: Linux version 3.13.0-37-generic running on amd64; UTF-8; en_US (nb)

------------------------------------------------------

But it IS reproducible in 8.0.2 with the latest patch. Reporter is right, if JS file has a header which starts with "/**" (note the two asterisks), then hints are not displayed and coloring is wrong (e.g. function name).

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11
Runtime: Java(TM) SE Runtime Environment 1.7.0_80-b15
Comment 7 Roman Svitanic 2015-06-05 11:36:40 UTC
Moreover it seems that even a comment (not a header) inside the file which starts with "/**" and has certain length causes the issue on 8.0.2. If the comment is short enough, the issue is not present.
Comment 8 Petr Pisl 2015-06-05 13:42:01 UTC
So it seems like a regresion in 8.0.2. In dev builds it's not reproducible.
Comment 9 Petr Pisl 2015-06-08 09:25:57 UTC
Because it works in dev build, I'm marking this issue as fixed in dev build.
Comment 10 Roman Svitanic 2015-07-07 08:33:24 UTC
*** Bug 253284 has been marked as a duplicate of this bug. ***