Almost perfect autocomplete for @extend

Hello, WebStorm 4.0 makes a big step forward in autocompletion for inherited methods, thank you!

but some still missing

code example:

function extend(Child, Parent) {
    var F = new Function();
    F.prototype = Parent.prototype;
    Child.prototype = new F();
    Child.prototype.constructor = Child;
    Child.superclass = Parent.prototype;
}

/**
* @constructor
*/
function CoreClass() {}
CoreClass.prototype.extend = extend;

core = new CoreClass();


/**
* @constructor
*/
function AClass() {}

/**
* public
*/
AClass.prototype.method = function(){};
/**
*
* @private
*/
AClass.prototype._privateMethod = function(){};
/**
*
* @protected
*/
AClass.prototype._protectedMethod = function(){};

/**
* @constructor
* @extends AClass
*/
function BClass() {}

// working extending
extend(BClass, AClass);
// not working extending
core.extend(BClass, AClass);

BClass.prototype.anotherMethod = function(){};
BClass.prototype._anotherMethod = function(){
    this. <-- private methods from AClass are present here
};

var bInstance = new BClass();
bInstance. <-- only public methods from BClass, but All methods from AClass



So there are problems and suggestions:
1)
issue: extend VS core.extend, and @extends. Seems, WS completely ignore JSDoc tag @extends, and operate only with function extend, but does not recognize if same functionality is present in some objects method.
what i need: I want WS to look at JSDoc @extends tag. Becase extend function may be unundestandable for WS (like using .superclass with deep extending), but I shall allways mark extending with tag @extends.
what i need: multiple @extends or something like that for Mixins, becase JavaScript allow it with no problem and they are realy useful without multiple inheritance. (I can provade additional information about my way of Mixin creation and usage)
2)
issue: As I mark in code above, @private and @protected methods are visible in public-only suggest
3)
issue: As I mark in code above, inherited @private methods are visible in child Class.
what i need: I swear, i will mark each method and property of each Class in whole my project with @private and @protected tags if it will allow me not to see @private methods from Parent class in autocomplete for Child class. And, in addition, I will pray for your health twice a week!

Guys, you make a good job! With your help we will get Strongly Typed JavaScript! We need just some more improvements and i will love you forever :)

Please sign in to leave a comment.