Community
Participate
Working Groups
It would be useful to have a quick fix that will add a function declaration for an undefined function. So I could type this: var y = divide(divisor/dividend); And a quick fix could then declare the function: function divide(divisor, dividend) { } This is like the "Create method" quick fix in JDT. It may be hard to guess the right scope to insert the function in, but inserting into the parent scope of the caller would be a reasonable starting point, and the user could move it around from there.
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg04002.html
Reopening, this is still a good idea. We should also provide a fix for variables to create a local var in the enclosing scope.