0

I'm using eclipse JSDT and I have a javascript object declaration that looks like this:

var rs1 = {};
rs1.person1 = {};
rs1.person1.phone = "hg";
rs1.person1.name = "lk";

Content assist will pull up rs1 properties (rs1.person1.name) in the editor if I add it to a file in the project javascript include path user library, but the following notation

var rs1 = {person1:{ phone:"hg", name:"lk"}};

then content assist will only go as far as rs1.person and stop. If I use this same JSON notation directly in my javascript, then content assist works as expected. It just doesn't work when I add it the project include path.

I've been struggling with this for a few days but I can't find a way to make it work.

Any ideas?

viragoboy
  • 131
  • 1
  • 4
  • Just tried and when I add the file defining rs1 to my include path, and try to access it from another file, I do not get any completions either. I am in mac, so I do not think this is a linux-only thing. – Andrew Eisenberg Jun 10 '13 at 02:32

1 Answers1

0

It seems that this may be a problem with eclipse on linux (I'm running ubuntu). I downloaded a fresh copy of indigo to ensure that it wasn't some third party plugin that was causing the problem, but the content assist was still not working.

Just tried it on a windows box this morning and content assist works as expected.

viragoboy
  • 131
  • 1
  • 4