Eclipse 3.4 Ganymede Javascript Validation Issue

2019-04-19 18:11发布

I just upgraded to Eclipse 3.4 for the second time and I think its for good now. The first time (right when it was released) was too buggy for me to stomach (mainly the PDT 2.0 plug-in); but now it seems to be all worked out.

My problem is the Javascript validator. If I define a class in one JS file in my project, then try to use it in another, it tells me that the type is undefined. This is really annoying as some of my scripts are littered with red squigglys.

Another problem is that this code:

var m_dialogFrame = document.getElementById(m_dialogId);

Makes a yellow squiggle saying "Type mismatch: cannot convert from Element to ___m_dialogBody5" I can fix it by adding

    /**
     * @type Element
     */

Before it, but that, also, will be messy.

Also, both:

new XMLHttpRequest();

And

new ActiveXObject("Microsoft.XMLHTTP");

Get red squiggles saying "x cannot be resolved to a type"

The last problem is with:

if (m_options.width != "auto")

Gets a red squiggly because: "The operator != is undefined for the argument type(s) Number, String"

How can I fix these issues, or just scrap the entire Javascript validation tool? BTW: it looks frikin awesome if I can get it to work.

7条回答
男人必须洒脱
2楼-- · 2019-04-19 19:12

Apparently to fully disable the validation you should also disable "Report problems as you type" under JavaScript -> Editor.

查看更多
登录 后发表回答