Community
Participate
Working Groups
Build Identifier: 20110615-0604, JSDT: 1.3.0.v201103031824 The content assist does not work for optional parameters. Code snippet: --------- /** * @constructor * @returns {Class} */ function Class() { this.op = function() { }; } /** * Does something. * * @param {Class} mandatoryParam mandatory parameter */ function f1 (mandatoryParam) { mandatoryParam.op(); // <== Content assist works } /** * Does something. * * @param {Class} [optionalParam] optional parameter */ function f2 (optionalParam) { optionalParam.op(); // <== NO CONTENT ASSIST } --------- This should work just the same, shouldn't it? Like this, the [] are no use, as I have to drop them and get back to the good old "(optional)" after the parameter description... Reproducible: Always
I just realized one more thing: Context help (mouse hover over the method op) doesn't work in both cases. However, it works with this code added to the end ---------- var xyz = new Class(); xyz.op(); // <== Content assist works, help works ----------