Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 457057

Summary: Generate doc command incorrectly computes function name with property literal
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2015-01-08 12:11:50 EST
Consider the following snippet:

Foo['bar'] = function() {};

if you activate the 'Generate Element Comment' command on it you get:

/**
 * @name Foo.
 * @description description
 * @function
 * @returns returns
 */
Foo['bar'] = function() {};

Which incorrectly computes the functions name leaving the name simply as 'Foo.'
Comment 1 Michael Rennie CLA 2015-01-08 12:50:08 EST
Fix + tests:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=95bd417a785c5351c94bfa6d34bb62166be19718

The doc is correctly generated now:

/**
 * @name Foo.bar
 * @description description
 * @function
 * @returns returns
 */
Foo['bar'] = function() {};

/**
 * @name Foo.baz.bar
 * @description description
 * @function
 * @returns returns
 */
Foo.baz['bar'] = function() {}

/**
 * @name Foo.bar.baz
 * @description description
 * @function
 * @returns returns
 */
Foo['bar'].baz = function() {}