Community
Participate
Working Groups
Using this week's WTP 3.0 I-build I20071220083058, try validating individual XML, WSDL or XSD files that contain errors. The validator reports no errors. (If you add the validation builder, error markers show up on the file(s). but individual file validation still reports success.)
Changing abstract...
I confirmed the same problem with JSP validation. I suspect the Validate action is broken for validating all file types.
I'm looking into this.
Created attachment 85717 [details] patch for this problem as well as some code cleanup Here is a patch for this problem. As well I have been cleaning up the old code (removing compiler warnings).
This change makes the jsp validator fail in my sample project, producing error messages like "Path must include project and resource name: /WebContent", if invoked manually (context menu in project explorer). Validation while saving a file and incremental validation still work. More specifically, you made the WorkbenchContext contain project-relative paths instead of workspace-relative ones like before (Validator.java:358). JSPValidator seems to expect workspace-relative paths in _helper.getUris(). Validation while saving file still produces workspace-relative paths. Is this change intentional?
This was already dropped in late December - If any issues remain please re-open
Verified using WTP M4 build 20080103043626. Opened bug 214286 to address improving the status message that appears.
Closing bug
I should add, that WSDL, XSD and XML validation appear to be ok. (The Validation Status dialog appears when there are valid errors in the files)
Amy, please verify HTML and JSP validation, and reopen if the problem still exists.
I verified that this is still not working for JSP & HTML validation. I also verified that I see the problem Matthias reported in comment #5. I'm reopening this bug for now, but please let me know if you'd rather me open 1 or 2 new bugs instead. Either way, I think these bugs are important to fix for M4.
Dropping this to major.... and moving to M5 - assigning to Gary for a second look
Sorry - moving back to M4... Missed Amy's note stating this is needed for M4
I investigated this bug a bit more and found that: a) the JSP Semantics (JSF) validator is the one that is throwing the error messages because apparently it is trying to validate every file. I've cc'd Cameron on this bug since he seems to handle most of the jsf validator bugs. I'll also open a separate bug for this issue. b) The XML, WSDL, XSD validators expect project-relative paths to be returned when context.getURIs() is called. The JSP, HTML, JS validators expect workspace-relative paths to be returned when context.getURIs() is called. How these validators could expect different formats of the paths is because the XML, etc validators use org.eclipse.wst.xml.core.internal.validation.core.Helper for context while the JSP, etc validators use org.eclipse.wst.validation.internal.operations.WorkbenchContext. Looking at WTP 2.0.2 code, I found that when populating both contexts' list of validation file uris, IWorkbenchContext.getPortableName() would be called. That is where the XML's Helper turns workspace-relative paths into project-relative paths. It looks like getPortableName() is no longer called in the new validator framework. Gary, is there some place in the new validator framework (that handles old validators) where getPortableName() can be called?
Created attachment 86227 [details] A patch for the JSP validation problem.
I did a quick test of the patch in comment #15 and found that xml, wsdl, xsd, html, jsp validators all seem to be working correctly.
I've applied the patch from comment #15 so will move to 'fixed' again. Will be in builds >= 20080105 Thanks Amy, for your diagnosis and careful testing.
using wtp3.0M4 20080105002406 verified jsp, html, xml, xsd, wsdl, dtd validators reports errors when there are some and report success when there arent any
This is now fixed.