Eclipse 3.4 Ganymede JavaScript验证问题 [英] Eclipse 3.4 Ganymede Javascript Validation Issue

查看:218
本文介绍了Eclipse 3.4 Ganymede JavaScript验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚升级到Eclipse 3.4,我认为它现在很好。第一次(正确的时候发布)对我来说太麻烦了(主要是PDT 2.0插件);但现在似乎全部已经解决了。

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.

我的问题是Javascript验证器。如果我在我的项目中的一个JS文件中定义一个类,那么尝试在另一个JS文件中使用它,它告诉我类型是未定义的。这是非常烦人的,因为我的一些脚本充斥着红色的波浪。

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);

发出一个黄色的抽搐说类型不匹配:不能从元素转换为___m_dialogBody5我可以修复它添加

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.

两个:

new XMLHttpRequest();

new ActiveXObject("Microsoft.XMLHTTP");

获得红色的抽搐说x无法解析为类型

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

最后一个问题是:

if(m_options.width!=auto)

if (m_options.width != "auto")

得到一个红色的波形,因为:操作符!=未定义参数类型数字,字符串

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

我如何解决这些问题,或者只是废弃整个Javascript验证工具? BTW:如果我可以让它工作,看起来真的很棒。

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.

推荐答案

看起来这个问题是由于默认浏览器Eclipse没有所需的库。

Looks like this problem is due to the default browser for Eclipse not having the required libraries.

尝试以下步骤添加所需的库:
项目 - >属性 - > JavaScript - > JavaScript库 - >库选项卡) - >添加运行库 - >选择'Internet Explorer库'

Try below steps to add the required library: Project -> Properties -> JavaScript -> JavaScript Libraries -> Libraries(tab) -> Add Runtime Library -> select 'Internet Explorer Library'

这应该可以解决问题。它为我做了。

This should resolve the issue. It did for me.

这篇关于Eclipse 3.4 Ganymede JavaScript验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆