MyEclipse: JavaScript: Suppressing errors re unknown properties

martyhall - Oct 02, 2007 - 06:18 PM
Post subject: JavaScript: Suppressing errors re unknown properties
In my Ajax apps, I have this JavaScript function in somefile.js:

Code:
function getRequestObject() {
  if (window.ActiveXObject) {
    return(new ActiveXObject("Microsoft.XMLHTTP"));
  } else if (window.XMLHttpRequest) {
    return(new XMLHttpRequest());
  } else {
    return(null);
  }
}


The second and fourth lines get flagged by MyEclipse as warnings, with the error messages "ActiveXObject declaration is not found" and "XMLHttpRequest declaration is not found", respectively. Similarly, I have a line with "document.getElementById(region).innerHTML = blah", and it says "innerHTML declaration not found".

Should I be writing the code a different way? If not, how can I suppress that type of warning in MyEclipse?

BTW, for my Ajax projects, I just do New --> Project --> MyEclipse --> Java Enterprise Projects --> Web project (the same as I do for regular servlets/JSP, Struts, or JSF). Should I be doing something extra to get additional Ajax support?

Thanks!
support-rkalla - Oct 04, 2007 - 06:57 PM
Post subject: RE: JavaScript: Suppressing errors re unknown properties
Marty,
You are doing the right things, unfortunately the JS validator isn't quite as robust as it needs to be at the moment to understand all this. What you can do is either ignore the warnings or right-click on the files in question and go down to MyEclipse and exclude those files from validation.
martyhall - Oct 04, 2007 - 07:07 PM
Post subject: RE: JavaScript: Suppressing errors re unknown properties
OK, thanks. Is it possible to exclude just that category of warnings from validation? I hunted around in Preferences and didn't find it, but wanted to double check.

Thanks!
support-rkalla - Oct 05, 2007 - 04:34 PM
Post subject: RE: JavaScript: Suppressing errors re unknown properties
Unfortunately not that specific of filtering yet, sorry.
belcherr - Feb 19, 2008 - 08:18 PM
Post subject: RE: JavaScript: Suppressing errors re unknown properties
Any progress on either suppressing the "xxx declaration is not found" message or being able to tell it what variable/attribute names to ignore or accept?
support-rkalla - Feb 19, 2008 - 09:20 PM
Post subject:
not for 6.5, 7.0 is looking like it will have a major update to JS editor though.
mazarata - Oct 25, 2009 - 03:09 PM
Post subject:
support-rkalla wrote:
not for 6.5, 7.0 is looking like it will have a major update to JS editor though.
I am having the same problem, as described in martyhall's post. I am using Vrsion 7.5.
When do you plan to implement the major update to JS as mentioned above?

mazarata
support-joy - Oct 26, 2009 - 10:12 AM
Post subject:
mazarata,

This is a management decision. I would request you to post a feature request here - http://www.myeclipseide.com/PNphpBB2-viewforum-f-7.html
What is the editor you are using the view the JSP? Have you tried - MyEclipse Visual JSP Designer?
Temporarily, you can try by doing the following - right click on the file, from the context menu click on MyEclipse > exclude from Validation.
marc2912 - Dec 08, 2009 - 12:33 AM
Post subject: Validation
So this is still a problem and we either show warnings which shouldn't be there or have to ignore an entire file from validation or is something finally available??? Neither of those sound like acceptable answers.
support-joy - Dec 08, 2009 - 08:29 AM
Post subject: RE: Validation
marc2912,

I would recommend you to download ME 8.0, this includes a lot of improvements on our JS editor.
bcichowlas - Apr 18, 2010 - 10:53 PM
Post subject: RE: Validation
I am using 8.0 with, I believe, all the available 8.5 updates and my situation is still that described above. Did I miss doing something?
support-joy - Apr 19, 2010 - 07:40 AM
Post subject: RE: Validation
bcichowlas,

I will escalate this issue to our dev team members to investigate this further. In the meantime, you can ignore the said warnings. To exclude the javascript file from validation, right click on the file > MyEclipse > Exclude from validation.

Sorry for the inconvenience.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits