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.
Use following snippet: function Foo(){ Foo.prototype.getA = function(){ return "A";}; Foo.prototype.getB= function(){ return "B"; }; } The second "call" of prototype property is not bold and the first one is. If the lines are changed like this: function Foo(url, name){ Foo.prototype.getA = function(){ return "A";}; FooBar.prototype.getB= function(){ return "B"; }; } Both "prototype" are bold Product Version: NetBeans IDE 7.2 RC1 (Build 201206272359) Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03 System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)
Another case: function A() { this.x = 1; this.x = 1; } A.prototype.inc = function() { this.x += 1; } The variable "x" in function A() is green, while in A.prototype.inc it is black
These are two different issues. The case with prototype is not a bug basically. It's intended. In the line with Foo.prototype.getA is prototype bold, because it's basically definition of the prototype object. On the line with Foo.prototype.getB is not bold, because it's the usage of the object. Probably I will change the strategy and the bold will be only objects that are really created though assignment to a literal object or new expression. The second case with this.x is a different issue. I'm going separate it.
For the second part I created new issue #215354
ok, thanks
Fixed in web main.
Integrated into 'main-golden', will be available in build *201207170002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ea7ea6357beb User: Petr Pisl <ppisl@netbeans.org> Log: #214982 - Prototype coloring is inconsistent
verified, thanks Product Version: NetBeans IDE Dev (Build 201207170002) Java: 1.7.0_06-ea; Java HotSpot(TM) Client VM 23.2-b08 System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)