简体   繁体   中英

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. 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.
  • This constructor function may be converted to a class declaration.

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.

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. 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.

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. 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." Eclipse's Missing Node.js dialog

Are there any other ways to shut off individual warnings/messages, or the javascript validations? Any help, or constructive suggestions would be very much appreciated. Thanks!

Sorry, the stackoverflow editor won't allow in-lining simple images.

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. 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? 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. At this time I cannot risk testing the latest Eclipse release due to possible lockout of the workspaces if eclipse cannot be downgraded. 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.

I was able to disable these javascript validation notes by changing the following setting.
Eclipse -> Window -> Preferences -> General -> Editors ->Text Editors -> Annotations

  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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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