Xavier,

it looks like JaxrsMetamodelValidator validator doesn't implement neither org.jboss.tools.common.validation.IStringValidator nor IJavaElementValidator interfaces. In order to being called by AsYouTypeValidationManager it should implement at least one of these interfaces. (Alexey may correct me if I'm wrong).

As I can see the JaxrsMetampdelValidator takes a number of files (of different types) and performs the different kinds of validations depending on the types of the given files. But we're not validating any files in As-you-type validator. We're validating either a certain strings in HTML/Java code (like EL-expressions in tag attributes or in Java-Strings) (then we're using IStringValidator) or we're looking for a changes in class structure (then we're using IJavaElement).

Not any change in any file (either HTML/JSP or Java) triggers the AsYouType validation. For example, we're not triggering AYT validation on tag changes or on method body changes (not sure now, but we can look at org.jboss.tools.common.validation.java.JavaDirtyRegionProcessor.isJavaElementValidationRequired() method to make sure).

Could you describe what changes in what kind of files/editors should trigger the AYT-validation for JAX-RS projects?

Regards,
Victor

On 06/03/2014 07:31 PM, Xavier Coulon wrote:
Hello Victor ! 

Looks like I'm lucky ;-) 
You can look at the code here:  https://github.com/jbosstools/jbosstools-webservices/blob/master/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/internal/validation/JaxrsMetamodelValidator.java

You'll see that there are calls to setAsYouTypeValidation(falsein all 3 validate() methods of JaxrsMetamodelValidator, but passing 'true' did not change anything (so far). Same with overriding the init() method with a call to  setAsYouTypeValidation(true)

Any hint would be much appreciated ;-)

Thanks in advance.
Best regards,
/Xavier



On 03 Jun 2014, at 16:48, Victor Rubezhny <vrubezhny@exadel.com> wrote:

Looks like a bug. As-you-type validation is proposed to be triggered when a user types something into an editor (with a small timeout). And looks like it works as expected in JBossTools HTML/JSP editor.
We have a bug in as-you-type validation that we've fixed last week. But that bug was about AYT validation in Java Editor and it's fixed for beta2.
 
How I can look at how and where your validator is plugged in into the org.jboss.tools.common.validation.ValidationErrorManager?

Regards,
Victor

On 06/03/2014 06:20 PM, Xavier Coulon wrote:
Hello,

My JAX-RS validator is based on our org.jboss.tools.common.validation.ValidationErrorManager, but it is currently triggered when the user saves a file or during a full build, only. 
What I would like to try is to have "as-you-type" validation, so that problem markers can be added/removed without having to wait for the next build, just like JDT does. Is there a way to configure the validator to get this behaviour, or is it a limitation of the WST Validator ?

Thanks.
Best regards,
/Xavier





_______________________________________________
jbosstools-dev mailing list
jbosstools-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosstools-dev

_______________________________________________
jbosstools-dev mailing list
jbosstools-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosstools-dev