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.
I often use factory methods to create objects or define prototype properties. In the example below I'm utilising an extension to Function.prototype that copies any object properties to any constructors prototype: Example.implement ( { /** * @private * A private field * @type {String} */ property: null /** * Invoke a method * @return {void} */ , method: function () { return; } } ); /** * Create a new Example * @constructor */ function Example () { }; Netbeans does NOT pick up on any properties when objects are defined this way, even if I annotate property and method with @class, @member, @memberOf or @namespace. There is no way at all to associate properties with constructor prototypes without explicitly implementing in the classic JavaScript manner: /** * A public flag variable * @type {Boolean} */ Example.prototype.flag= null or by assigning an object to prototype Example.prototype= { /** * A name property * @type {String} */ name: null } or by defining within a constructor function Example (value) { /** * @private * @type {Number} */ this.value= value }; There should be some way to inform the IDE that a property is a member of a class, without having to write code in a certain way. I suggest then, the use of @member to inform the IDE, or even better, for Netbeans to provide a way to register a factory method or implementation idiom that it can infer from. In a nutshell- annotations should drive how the IDE interprets an object and its members- and these annotations should be entirely decoupled from, or override, inferences made from programming style.
The same approach we have in PHP. Should be doable.