micmath/jsdoc — Issue #48: Source lines incorrect for object literals
Author: kived
Created: 2011-10-13 18:34:05+00:00
State: open

When documenting members of an object literal as a class, the line numbers in the source are reported as the start of the object literal rather than the location of the property or method being documented.

Example:

```javascript
/**
* Some description
* @class SomeController
* @extends AppController */
var SomeController = /** @lends SomeController */ { // line 5
/** @memberOf SomeController */
name: 'SomeController',

/** Some method
* @param {Number} someParam
*/
someMethod: function( someParam ) { // line 12
.....
}
};
```
Note: I realise that @memberOf isn't required in this instance to get jsdoc to generate documentation, however Eclipse does not recognize the class without it.

The generated documentation will state that SomeController.someMethod is on line 5, not on line 12. When dealing with files with 6000+ lines, it would be nice to have the correct line number (especially since I'm generating a link to our source repository via Trac).