开发者

Difference in Javascript validation between Eclipse Helios and Eclipse Indigo

开发者 https://www.devze.com 2023-03-21 03:19 出处:网络
I\'ve been experimenting with JSDT. Under Indigo, the validation has stopped complaining about unknown fields of objects. In Helios, it does.

I've been experimenting with JSDT.

Under Indigo, the validation has stopped complaining about unknown fields of objects. In Helios, it does.

This is for all objects, as far as I can tell, but here's one example

I have a JSDT user library that among other things documents a log object.

log = function(){};
log.prototype = new Object开发者_开发知识库();
log.debug = function(str){};
log.info = function(str){};
log.warn = function(str){};
log.error = function(str){};

And if I type

log.

into a Javascript editor, I get a completion list that includes info, warn etc.

If I continue and type

log.foobar()

in Helios, an error is detected and the message is about foobar not being known. This is good and what I want.

In Indigo, nothing. No error, it will happily accept any old garbage (I know that's what Javascript can do, but the point of JSDT is to do some inference and point out potential problems like this)

Is there some preference or option I've missed?

I do want to use Indigo since JSDT in Helios is more than a little buggy and I'm hoping Indigo is better.


There are too many dynamic ways for the foobar property to be added to the log object, and false positives can drown out real problems. This was removed in Indigo.

0

精彩评论

暂无评论...
验证码 换一张
取 消