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

Bug 458693

Summary: FunctionExpression JSDoc is being stripped from definitions during inferencing
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 8.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2015-01-28 19:03:33 EST
Confirmed not a regression from bug 458691 - but the associated JSDoc for function expressions is being added and later removed during post processing.

Consider the following example:

var f = {
    /**
     * @name one
     * @description description
     * @function
     * @returns returns
     */
    one: function() {},
    two: o //assist here
};

Activate assist where indicated and notice the tooltip for the 'one' completion is just the function name ( one() ) rather than its doc.

A quick debug revealed we initially correctly collect the doc for the function, but subsequent passes of inferencing remove it. I also noticed that we end up creating the f.one property 5 times during one inferencing pass.
Comment 1 Michael Rennie CLA 2015-02-09 19:52:04 EST
Fix + tests:

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

It turned out it wasn't so much that the doc was being stripped, but that there was not really any support for function expressions beyond @return and @param tag checks., now we pass through the computed doc and no longer remove existing cached doc