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 205098 - Properties added in prototype methods aren't shown in navigator
Summary: Properties added in prototype methods aren't shown in navigator
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 14:31 UTC by wheresrhys
Modified: 2012-12-17 12:39 UTC (History)
0 users

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 wheresrhys 2011-11-14 14:31:30 UTC
Test case:

        var Test = function () {
                this.prop1 = true //shows up in navigator pane
	};

	Test.prototype.addItems = function() {
		this.prop2 = true; //doesn't show up in navigator pane
	}

As scope can be assigned dynamically in javascript "this" won't necessarily always refer to an instance of Test. But in the Test constructor function netbeans assumes that "this" refers to a Test instance, so it makes sense to make the same assumption within prototyped methods.
Comment 1 Petr Pisl 2012-09-21 12:56:20 UTC
Still reproducible in 7.3
Comment 2 Petr Pisl 2012-12-16 14:24:38 UTC
Already fixed. Adding test for this case:

http://hg.netbeans.org/web-main/rev/87b6aab88a96
Comment 3 Quality Engineering 2012-12-17 12:39:20 UTC
Integrated into 'main-golden', will be available in build *201212170919* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/87b6aab88a96
User: Petr Pisl <ppisl@netbeans.org>
Log: #205098 - Properties added in prototype methods aren't shown in navigator