MyEclipse: Javascript validation

douglas_a_lauder - Mar 07, 2006 - 09:45 PM
Post subject: Javascript validation
Firstly, great job on the Javascript validator and debugger.

An issue I'm having with the validator is it is generating warnings "Declaration of variable..." messages for any function call that is in another JS file. I include several JS files in an HTML page, for example some utility functions that I reuse. How do I tell the validator to look in other files for the declarations? All the JS files are in the same directory, which is a subdirectory off the WebRoot.

Also I see the same warning regarding the Image object as in "var myImg=new Image(10,10);".

Are these bugs, future enhancments, ... ?

Cheers,
Doug

*** Date: Tue Mar 07 16:35:55 EST 2006

*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.4.2_06

*** MyEclipse details:
MyEclipse Enterprise Workbench

Version: 4.1.0 GA
Build id: 20060122-4.1-GA

*** Eclipse details:
Eclipse SDK

Version: 3.1.1
Build id: M20050929-0840

Eclipse Platform

Version: 3.1.1
Build id: M20050929-0840

Eclipse RCP

Version: 3.1.1
Build id: M20050929-0840

Eclipse Java Development Tools

Version: 3.1.1
Build id: M20050929-0840

Eclipse Plug-in Development Environment

Version: 3.1.1
Build id: M20050929-0840

Eclipse Project SDK

Version: 3.1.1
Build id: M20050929-0840

Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Drive_E_\Eclipse-3.1.1\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
f94_64
-vm
C:\WINDOWS\system32\javaw.exe
support-rkalla - Mar 08, 2006 - 03:40 PM
Post subject:
These are shortcommings we need to address, sorry for the trouble.
tmose - Mar 11, 2006 - 03:40 PM
Post subject:
Any idea when this problem will be addressed, currently have to turn off validation which somewhat defeats the need for the plugin.
support-rkalla - Mar 11, 2006 - 03:56 PM
Post subject:
There is no hard set timeline for this but we hope during the 5.x release cycle.
douglas_a_lauder - Jan 10, 2007 - 09:39 PM
Post subject: Javascript validation
Any news on the issue where we get "Declaration of variable..." messages for any function call that is in another JS file?

Realtime validation in the IDE for JavaScript is a great feature, but unusable since any significant project is going to share functions from other files etc.

Cheers,
Doug
support-rkalla - Jan 10, 2007 - 10:15 PM
Post subject:
Doug,
I'm sorry I don't have a set time line for you on this.
douglas_a_lauder - Apr 18, 2007 - 06:35 PM
Post subject: JavaScript validation: "declaration of variable"
This inability to find declarations in other javascript files is still not fixed. The JavaScript validation feature is borderline useless since we cannot create a clean JS file.

Still waiting...
douglas_a_lauder - Oct 31, 2007 - 05:13 AM
Post subject: RE: JavaScript validation: "declaration of variable&qu
I just downloaded 6.0.1 and these issues are still there. Validator warnings even for built in objects like Image, XMLHttpRequest. I got around the Image warning by using createElement("img") but still get too many warning for functions defined in other files to have the validator of any use. Too bad, because it is a great concept.
support-rkalla - Oct 31, 2007 - 04:47 PM
Post subject: RE: JavaScript validation: "declaration of variable&am
Doug,
The JS validator didn't get any love for 6.0.1, but it needs to especially with the improved Ajax support.

Still pinging management about this.
dressegu - Mar 10, 2008 - 10:16 PM
Post subject:
Has this been addressed yet? I'm still seeing the same thing - especially using jQuery where it warns that the $ variable can't be found!

Is there at least a way to turn off the validation completely? I've tried doing so with what seemed like the obvious options under the preferences dialog, but no change. Having 1000's of warning icons down the left and right hand edges of the edit window is very distracting. Suggestions please?
support-rkalla - Mar 10, 2008 - 11:15 PM
Post subject:
dressegu,
You did the right thing for turning off the JS validation, the markers down the *right* side are real time "reconciler" markers, those cannot be turned off without turning off autocomplete and the like.
pflickner - May 03, 2010 - 03:59 PM
Post subject: Javascript Validation
I had been struggling with this issue for awhile now and finally found the solution. I had foolishly turned on javascript validation and just turning it off didn't work. I did two things today that actually (finally!) made the difference: 1) I removed the .settings folder, and 2) I opened up the .project file and found a ton of validators for the build set there. Here's what my .project looks like now:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
   <name>application_name</name>
   <comment></comment>
   <projects>
   </projects>
   <buildSpec>
      <buildCommand>
         <name>org.eclipse.jdt.core.javabuilder</name>
         <arguments>
         </arguments>
      </buildCommand>
   </buildSpec>
   <natures>
      <nature>org.eclipse.jdt.core.javanature</nature>
   </natures>
</projectDescription>


This is bare bones. You don't want to know what it looked like before. My system performance in eclipse has skyrocketed. If that doesn't work, then I have nothing else.
support-joy - May 10, 2010 - 01:22 PM
Post subject: RE: Javascript Validation
Good to hear you are all set. And thank you for sharing your findings with us. This will help other forum users.

Best.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits