Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Some (hopefully) quick validator v2 questions

I was able to implement something which looks like it works, at least in debugging mode.  The V2 framework solved my problem about triggering validation on resource content types which extend another resource content type, so I'm sure I've got the basic setup correct.  And I can follow that problem markers are indeed added to the resources where they should be added.  And it doesn't *seem* as though the problem markers get deleted after they've been added.  And the validation dialog comes back with something like "8 errors in 19 resources" every time, so everything seems good up to that point.  But after validation is done, the problems view shows *nothing*.  I've messed with the problems view filters and scoured the debugger for places where my added markers get deleted, but so far it's a mystery.  Is there anyone who can shed any light on this?  Where did my markers go?

Here's our implementation (check out the patch) if anyone has any ideas on this:  https://bugs.eclipse.org/bugs/show_bug.cgi?id=252891

Thanks,
- Paul

Paul Fullbright wrote:
Thanks, especially the last point.

One other point of confusion I had was how to tie our existing helper class into the new/old implementation.  Can that be done?  I see the HTMLValidationWorkbenchHelper still around, but I don't see it used anywhere.

- Paul


Gary Karasiuk wrote:

Currently the best place for documentation is the Javadoc.

Most of the validators that are currently enabled to the new framework, simply made a few changes to their earlier validators to convert them into v2 validators. You could look at the HTML or XML ones as examples.

You don't want to use the delegates extension point, it is for something else entirely.

There are other validators, that want to be triggered on may different types of changes, but then only want to run once. The method you want to use is org.eclipse.wst.validation.ValidationResult#setSuspendValidation(IProject project)

setSuspendValidation
public void setSuspendValidation(IProject project)
Calling this method will inform the framework, that this validator does not wish to be called again for any resources in this project, for the duration of this validation operation.

Some validators may have a rich set of triggers, but once they have been invoked once, do not need to be invoked again during the course of the current validation.
Parameters:
project - The project that this validator no longer wants to be notified on.

I hopes this helps.


Gary Karasiuk, RAD Performance Analyst
karasiuk@xxxxxxxxxx
TL-969-3985, external: (905)-413-3985



From: Paul Fullbright <paul.fullbright@xxxxxxxxxx>
To: "General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>
Date: 11/19/2008 11:23 AM
Subject: [wtp-dev] Some (hopefully) quick validator v2 questions





Hello all,

As a result of adding a new resource type in our extension of our own
JPA tools framework, it seems we need to advance quickly to the v2
validator framework.  Very quickly.  I wonder if I could pose a few
questions:

- In the presentation (here:
http://www.eclipse.org./webtools/common/validation/New-VF-2007-12-11.pdf)
it was hinted that one could provide a v2 implementation by wrapping an
existing v1 implementation.  Obviously, if we need to do this quickly,
this sounds very good.  Looking at the existing v2 validators, I don't
see anyone who has done what I understand as wrapping.Can someone give
me a thumbnail sketch of how that might be done?  I tried finding a
post-implementation overview, but only found one from 2005
(
http://www.eclipse.org/webtools/wst/components/validation/ValidationOverview.html).  
Do I want the delegating validator?  And if so, do I need to use the
validatorDelegates extension point?

- Relatedly, there was a hint in the bug
(
https://bugs.eclipse.org/bugs/show_bug.cgi?id=212196) that there might
be a getting started guide.  *Is* there a getting started guide?

- Most of the validator framework surrounds validation of a *file*.  Are
there any thoughts about *project-wide* validation?  The nature of the
beast that is JPA is that everything depends on everything else.  
Changing a java file can change validation for a persistence.xml file.  
Changing the persistence.xml file can change validation for an orm.xml
file.  Changing the orm.xml file can change validation for the original
java file.  So each validation run for us, due to the nature of JPA,
implies a validation of the entire project.  But each validation run is
centered on a single file.  This means that if several files change (or
if a project wide validation is run), then the project gets validated
once for each resource, which is a huge waste of cycles.  Any thoughts
on how we can register validation to be run on changes to all these
files, but done only once per project, per validation run?  (OK, this
one isn't as quick, but it also isn't as pressing, either.)

Thanks in advance,

--
Paul Fullbright
Oracle Corp.
Eclipse Dali/Java Persistence Tools Development
paul.fullbright@xxxxxxxxxx

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev



_______________________________________________ wtp-dev mailing list wtp-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/wtp-dev


_______________________________________________ wtp-dev mailing list wtp-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top