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


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


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Back to the top