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 214556 - Inheritance in JavaScript2 editor required
Summary: Inheritance in JavaScript2 editor required
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 215398 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-21 08:24 UTC by Martin Fousek
Modified: 2013-01-22 13:15 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 Martin Fousek 2012-06-21 08:24:15 UTC
I have following JS code:
function A() {
}
A.prototype.say = function() {
    return "ahoj";
}
var a = new A();
function B() {
}
B.prototype = new A();
var b = new B();
alert(b.say());

This work well in runtime, but I don't get in code completion at alert(b.|) the method "say()" which should be inherited from the object A.

Sorry for P2 priority, but the issue is crucial for the completion of core JavaScript's objects which are got from JsStubs (in another words, this inheritance is used in jsstubs).
Comment 1 Petr Pisl 2012-07-11 14:36:47 UTC
Implemented now in the web-main. This case should work now.
Comment 2 Vladimir Riha 2012-07-11 19:06:19 UTC
*** Bug 215398 has been marked as a duplicate of this bug. ***
Comment 3 Quality Engineering 2012-07-12 08:18:06 UTC
Integrated into 'main-golden', will be available in build *201207120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/86c38bd33953
User: Petr Pisl <ppisl@netbeans.org>
Log: #214556 - Inheritance in JavaScript2 editor required

It's basically adding a feature: the code completion is able to resolve simple prototype chain now.
Comment 4 Vladimir Riha 2013-01-22 13:15:39 UTC
verified

Product Version: NetBeans IDE 7.3 RC1 (Build 201301212100)
Java: 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)