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 210136 - Global variables not recognized
Summary: Global variables not recognized
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-26 16:46 UTC by Vladimir Riha
Modified: 2013-01-08 16:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test case (1.87 KB, application/javascript)
2012-03-26 16:46 UTC, Vladimir Riha
Details
screenshot (9.13 KB, image/png)
2012-04-26 09:17 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-03-26 16:46:52 UTC
Created attachment 117276 [details]
test case

Look at the attached sample code. There are 2 variables: fs and microdata_ext. They are not really global but they should be colorized differently inside the run() function (see the exports.makeindicies where those variables are correctly purple)

Product Version: NetBeans IDE Dev (Build 2012-03-26_07-07-31 )
Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17
System: Linux version 2.6.38-13-generic running on amd64; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2012-04-26 09:17:29 UTC
Created attachment 118791 [details]
screenshot

One screen with probably related issue. On the on left when you place cursor inside the "value" used in ahoj() or foo{} then the initial declaration should be highlighted, but it is not.  Also the color of "value" in foo should be purple. If you use insert another line (on the right) with "value=1" then the usage in ahoj() is highlighted bot not initial declaration and foo{} usage.
Comment 2 Vladimir Riha 2012-08-13 12:16:37 UTC
fyi also affects rename refactoring
Comment 3 Petr Pisl 2012-12-17 15:13:34 UTC
This should be already fixed. Adding test for this. http://hg.netbeans.org/web-main/rev/774b0d08e9ba
Comment 4 Quality Engineering 2012-12-18 03:03:31 UTC
Integrated into 'main-golden', will be available in build *201212180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/774b0d08e9ba
User: Petr Pisl <ppisl@netbeans.org>
Log: #210136 - Global variables not recognized
Test
Comment 5 Vladimir Riha 2013-01-08 16:01:54 UTC
Thanks, it is OK now


Product Version: NetBeans IDE Dev (Build web-main-9658-on-20130108)
Updates: Updates available
Java: 1.7.0_10; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18