简体   繁体   English

关闭 Eclipse 2020-06 Javascript 验证说明

[英]Turning off Eclipse 2020-06 Javascript Validation Notes

Using Eclipse's 2020-06 built in JavaScript editor, I need to disable the JavaScript informational notes on syntax and warnings as displayed with an (i) icon to the left of the line number and with markers to the right of the scroll bar.使用 Eclipse 的 2020-06 内置 JavaScript 编辑器,我需要禁用 JavaScript 语法和警告信息说明,如行号左侧的 (i) 图标和滚动条右侧的标记所示。 See links to the two images showing what these look like.请参阅两张图片的链接,展示它们的外观。

An example of the informational icon信息图标示例

An example of the markers标记示例

There are two warnings repeating numerous times:有两个警告重复多次:

  • 'aVariableName' is declared but its value is never read. 'aVariableName' 已声明,但它的值从未被读取。
  • This constructor function may be converted to a class declaration.此构造函数 function 可以转换为 class 声明。

I would rather turn off these two individual messages since they do not apply to the project, but such control does not appear to exist, but they are overly spamming the editor and are interfering with other notifications and informational notes.我宁愿关闭这两条单独的消息,因为它们不适用于项目,但这种控制似乎不存在,但它们过度向编辑器发送垃圾邮件并干扰其他通知和信息说明。 FYI: I'm needing to follow specific coding conventions for the project and therefore the warnings don't even apply to the project and are just spam.仅供参考:我需要遵循项目的特定编码约定,因此警告甚至不适用于项目,只是垃圾邮件。

So I'll just settle for shutting off javascript validation, but the validation will not turn off.所以我会满足于关闭 javascript 验证,但验证不会关闭。

I've tried to disable the project level settings for the javascript validation through the menu option Window, Preferences, Web, HTML Files, Client-side Javascript, Validator, Errors/Warnings: and unchecked both options of Strict Validation of Javascript keywords usage, and Enable JavaScript semantic validation. I've tried to disable the project level settings for the javascript validation through the menu option Window, Preferences, Web, HTML Files, Client-side Javascript, Validator, Errors/Warnings: and unchecked both options of Strict Validation of Javascript keywords usage,并启用 JavaScript 语义验证。 But making those changes accomplishes nothing since the warnings are still there even after running validation on the project, cleaning the project, and even restarting eclipse.但是进行这些更改没有任何效果,因为即使在对项目运行验证、清理项目甚至重新启动 eclipse 之后,警告仍然存在。

The specific version of Eclipse is: Eclipse IDE for Enterprise Java Developers Version 2020-06 (4.16.0) The specific version of Eclipse is: Eclipse IDE for Enterprise Java Developers Version 2020-06 (4.16.0)

To try to better explain the need to install Node.js, this is the dialog requested Node.js be installed.为了更好地解释需要安装 Node.js,这是要求安装 Node.js 的对话框。 The text of the dialog reads: "Missing node.js" "Could not find node.js. This will result in editors missing key features. Please make sure node.js is installed and that your PATH environment variable contains the location to the 'node' executable."对话框的文本为:“Missing node.js”“找不到 node.js。这将导致编辑器缺少关键功能。请确保 node.js 已安装并且您的 PATH 环境变量包含“节点”可执行文件的位置。 " Eclipse's Missing Node.js dialog Eclipse 缺少 Node.js 对话框

Are there any other ways to shut off individual warnings/messages, or the javascript validations?是否有任何其他方法可以关闭单个警告/消息或 javascript 验证? Any help, or constructive suggestions would be very much appreciated.任何帮助或建设性建议将不胜感激。 Thanks!谢谢!

Sorry, the stackoverflow editor won't allow in-lining simple images.抱歉,stackoverflow 编辑器不允许内联简单图像。

Update: So I have not been able to figure out how to disable the informational notices that are showing up in the JavaScript editor along both the left and right margins.更新:所以我无法弄清楚如何禁用 JavaScript 编辑器中左右边距显示的信息通知。 I would still love to find out how to do that.我仍然很想知道如何做到这一点。 I'm wondering if the issues I'm seeing may have been resolved in the current release of Eclipse?我想知道我看到的问题是否已经在当前版本的 Eclipse 中得到解决? I cannot put my development environments at risk if downgrading is not possible.如果无法降级,我不能将我的开发环境置于危险之中。 But some hopeful and important details that I have learned is that the latest release of Eclipse "can" support java 1.8 although it says the minimal version supported is Java 11. And also the latest release is better integrated with Node.js so an external install is no longer required. But some hopeful and important details that I have learned is that the latest release of Eclipse "can" support java 1.8 although it says the minimal version supported is Java 11. And also the latest release is better integrated with Node.js so an external install is no需要更长的时间。 At this time I cannot risk testing the latest Eclipse release due to possible lockout of the workspaces if eclipse cannot be downgraded.目前我不能冒险测试最新的 Eclipse 版本,因为如果 eclipse 无法降级,可能会锁定工作区。 I will make plans to rebuild some of the workspaces on another workstation so it will not impact vital projects if something should go wrong.我将计划在另一个工作站上重建一些工作区,这样如果 go 出现错误,它不会影响重要项目。

I was able to disable these javascript validation notes by changing the following setting.通过更改以下设置,我能够禁用这些 javascript 验证说明。
Eclipse -> Window -> Preferences -> General -> Editors ->Text Editors -> Annotations Eclipse -> Window -> 首选项 -> 常规 -> 编辑器 -> 文本编辑器 -> 注释

  1. find "Infos" in the "Annotation types" and click it在“注释类型”中找到“信息”并单击它
  2. uncheck both the "Vertical Ruler" and "Overview Ruler"取消选中“垂直标尺”和“概览标尺”
  3. optional - uncheck "Text as "Squiggly Line"可选 - 取消选中“文本为”波浪线“
  4. Click Apply and Close单击应用并关闭
  5. Voila enjoy the less cluttered javascript files瞧,享受不那么杂乱的 javascript 文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM