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 224075 - Undefined property is not purple in editor
Summary: Undefined property is not purple in editor
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P4 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-20 09:20 UTC by Vladimir Riha
Modified: 2015-05-26 03:12 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 Vladimir Riha 2012-12-20 09:20:24 UTC
Sample code:

if (t1==undefined)
{
alert("t1 is undefined");
}
if (t2===undefined)
{
alert("t2 is undefined");
}


undefined keyword is considered as variable and not recognized by editor (it is not blue but black)



Product Version: NetBeans IDE Dev (Build web-main-9571-on-20121219)
Java: 1.7.0_10; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18
System: Linux version 3.2.0-34-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Petr Pisl 2012-12-21 13:09:50 UTC
Undefined is not a keyword, its a property of global object and primitive value so it shouldn't be blue.

https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/undefined
Comment 2 Vladimir Riha 2012-12-21 14:28:41 UTC
Interesting, I'm sorry I didn't know about it. I thought it is since many editors usually highlight it as a keyword.
Comment 3 Vladimir Riha 2012-12-21 14:35:34 UTC
So shouldn't the "undefined" be purple as for instance Infinity or NaN?
Comment 4 Vladimir Riha 2013-01-14 12:50:53 UTC
Reopening because I think undefined should be purple as NaN etc. but not black as any local variable (I don't want to report new issue since this was about distinguishing undefined-although incorrectly assumed to be keyword, in code).
Comment 5 Petr Pisl 2015-05-25 12:36:00 UTC
Fixed in web-main.
Comment 6 Quality Engineering 2015-05-26 03:12:50 UTC
Integrated into 'main-silver', will be available in build *201505260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9762dcb8225a
User: Petr Pisl <ppisl@netbeans.org>
Log: #224075 - Undefined property is not purple in editor