vmware-archive / scripted

The Scripted code editor
Eclipse Public License 1.0
1.56k stars 166 forks source link

Weird / incorrect content assist suggestions #256

Closed kdvolder closed 11 years ago

kdvolder commented 11 years ago

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)
aeisenberg commented 11 years ago

Appears fixed along with my fix for issue #258.