在 Eclipse 中禁用 Ant 脚本的 DTD 警告?
我正在使用 Eclipse Ganymede。 一切工作正常,但我对无警告的“问题”选项卡有一种强烈的渴望。 现在它(正确地)抱怨我的 Ant 脚本:“没有语法约束(DTD 或 XML 模式) )检测到该文档。” 有没有办法只对这些文件关闭它? 理想情况下,如果我的其他模式约束文件缺少模式声明,我希望它仍然警告我。
I'm using Eclipse Ganymede. Everything works fine, but I have an anal-retentive yearning for a warning-free Problems tab. Right now it (correctly) complains about my Ant scripts: "No grammar constraints (DTD or XML schema) detected for the document." Is there any way to turn that off for just those files? Ideally I'd like it to still warn me if my other schema-constrained files were missing the schema declarations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
最简单的方法是提供一个最小的 DTD 来关闭它。
对于 ant 文件
The simplest is to supply a minimal DTD to shut it up.
for ant files
和布莱恩一起讨论“对无警告问题选项卡的肛门保留渴望”,我最终决定认真解决这个问题。 在马丁的带领下,事情看起来已经板上钉钉了。
然而,而不是项目-> 属性,它可以通过 Windows 全局解决 -> 优先。
Being with Brian on the "anal-retentive yearning for a warning-free Problems tab", I finally decided to get serious about solving this. Thanks to Martin's leading, it looks like a done deal.
However, instead of Project -> Properties, it's solvable globally via Windows -> Preferences.
尽管此线程有点旧,但有人可能会发现这很有趣:
http://www.cs.hs-rm.de/~knauf/KomponentenArchitekturen2008/jsfunit/index.html
转到项目属性 -> 验证并按照该页面上的屏幕截图进行操作。 即使您不会说德语,也应该很容易。 ;-)
这个解决方案对我来说非常有效。 干杯!
Even though this thread is a little older, somebody might find this interesting:
http://www.cs.hs-rm.de/~knauf/KomponentenArchitekturen2008/jsfunit/index.html
Go to Project Properties -> Validation and follow the screen shots on that page. Should be easy even if you don't speak German. ;-)
This solution worked perfectly for me. Cheers!
您可以将其删除并恢复以避免出现警告。 显然,这是一个错误。
You can delete it, and restore it to avoid the warning. It is a bug, obviously.
我在较新版本的 Eclipse 中看到了禁用此功能的选项。 它位于:窗口、首选项、XML、XML 文件、验证,然后将下拉列表“未指定语法时指示:”从“警告”更改为“忽略”。
I see an option to disable this in newer versions of Eclipse. It is under: Window, Preferences, XML, XML Files, Validation then change the drop-down "Indicate when no grammar is specified:" from "Warn" to "Ignore"..
事实上,正如 damoco 所说,这似乎是 Eclipse 中的一个 bug。 如果我从 Windows 中删除(复制到其他地方)该文件,刷新 Eclipse,然后恢复该文件,然后再次刷新,警告就会消失。
我正在使用 Eclipse Galileo 版本 20090621-0832。
In fact, as damoco says, this seems to be a bug in Eclipse. If I delete (copy elsewhere) the file from windows, refresh eclipse, and then restore the file, and refresh again, the warning goes away.
I'm using Eclipse Galileo build 20090621-0832.
右键单击警告将其删除,然后清除
right click on the warning to delete it, then clean