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 245649 - Editor recognizes Javascript property as function
Summary: Editor recognizes Javascript property as function
Status: RESOLVED WONTFIX
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-14 13:59 UTC by iluvtr
Modified: 2014-07-21 09:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Detail of bug (11.70 KB, image/png)
2014-07-14 13:59 UTC, iluvtr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iluvtr 2014-07-14 13:59:57 UTC
Created attachment 148038 [details]
Detail of bug

As you can see in the image the editor recognizes Javascript property as function (bold)
Comment 1 iluvtr 2014-07-14 14:03:31 UTC
This occurs when I create an object and to this object I attach a property referring to other object I mean:

var object = {
   name : 'Nestor',
   address : { city:'Lima', country:'Perú' } //This is when things break!
   salute : function() {
          return 'Hello';
    }
}
Comment 2 Vladimir Riha 2014-07-14 14:11:08 UTC
You can change it in Tools|Options|Fonts & Color -> Syntax, language JavaScript and Category "Class". Personally I like it as you can quickly recognize obj. literal...

Reproducible, but not a P2. The workaround is quite simple, adjust formatting.


Product Version: NetBeans IDE Dev (Build web-main-1023-on-20140714)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.13.0-30-generic running on i386; UTF-8; en_US (nb)
Comment 3 Petr Pisl 2014-07-21 09:40:27 UTC
Vlada is true. It's not a function, it's a object literal (mapped to the class color). The class and function looks in the default theme in the same way. User can change.