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'm trying to document Facebook's response objects, but NetBeans doesn't seem to understand @typedef or @property. Here's the documentation: /** * Passed to Facebook event and request callbacks. * * @typedef {Object} FB.Response * @property {string} status One of "unknown", "not_authorized", or "connected" * @property {FB.AuthResponse} authResponse Present when status is "connected" */ /** * Embedded in the responses when the user is "connected". * * @typedef {Object} FB.AuthResponse * @property {string} userID Unique user identifier (seems to hold an integer as a string) * @property {string} accessToken May be used to make API calls on the user's behalf * @property {string} signedRequest Some opaque value not described in the documentation * @property {int} expiresIn Time in seconds after which the access token and signed request will expire */ I'd like to see code-completion on "response" below: /** * Handles the response from a Facebook status request. * * @param {FB.Response} response Received from Facebook */ function handleResponse(response) { response.[ctrl-tab] } My current work-around is to create a fake object in another file that doesn't get executed: FB.Response = { status: 'unknown', authResponse: { userID: '123', accessToken: 'foo', signedRequest: 'bar', expiresIn: 123 } };
That would have definitely sense to support it in the future. Petre don't you know whether there would be necessary anything else from the documentation? Probably something like? JsObject getDefinedObjects()
IMHO JsDocumentationHolder can have a support of this. Probably something like getTypeDefinitions(). It will be per file and an ast node independent. The method getTypeDefinitions should not return directly the JsObject implementation, the object should be created in the model itself and the documentation provider / holder can just provide the information. Another way is to obtain all documentation blocks and tags from them. The model can go through the doc blocks and build the types from the blocks.