vmware-archive / scripted

The Scripted code editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weird / incorrect content assist suggestions

kdvolder opened this issue · comments

Sometimes content assist suggestion are simply suggesting wrong things while missing the things that I'd expect even in cases where you would probably expect it to work based on code-structure.

For example in the current dev branch if I go to 'start-cloudfoundry.js.
On line 72.

 var server=require('../server/scriptedServer.js').start(filesystem, {

Place cursor after the '.' before 'start' and press ctrl-space.

I get suggestions like 'compose' and 'configure', 'readFileSync'.

These functions are in fact NOT defined or exported by the scriptedServer module.
Why am I seeing them?

The only function scripted server exports is called 'start'.

Why am I not seeing that one?

I am seeing this error message in error log:
Uncaught TypeError: Cannot read property 'kind' of undefined esprimaJsContentAssist.js:2392

This is in Chrome.

Now in Firefox...

There I don't get any specific suggestions... only the generic Object ones like 'hasOwnProperty' and friends.

And I'm seeing this error in the error log:

 type is undefined
 var res = type[name];
 esprimaJsContentAssist.js (line 1765)

Appears fixed along with my fix for issue #258.