<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Xavier,<br>
<br>
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).<br>
<br>
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).<br>
<br>
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).<br>
<br>
Could you describe what changes in what kind of files/editors
should trigger the AYT-validation for JAX-RS projects?<br>
<br>
Regards,<br>
Victor<br>
<br>
On 06/03/2014 07:31 PM, Xavier Coulon wrote:<br>
</div>
<blockquote
cite="mid:4AEFE79A-DFC6-480C-B3B7-61232B4BD414@redhat.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Hello Victor !
<div><br>
</div>
<div>Looks like I'm lucky ;-) </div>
<div>You can look at the code here: <a moz-do-not-send="true"
href="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">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</a></div>
<div><br>
</div>
<div>You'll see that there are calls to <span style="font-family:
'Source Code Pro'; font-size: 11px;">setAsYouTypeValidation(</span><span
style="font-family: 'Source Code Pro'; font-size: 11px; color:
rgb(147, 26, 104);"><b>false</b></span><span
style="font-family: 'Source Code Pro'; font-size: 11px;">) </span>in
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 <span style="font-family:
'Source Code Pro'; font-size: 11px;">setAsYouTypeValidation(</span><span
style="font-family: 'Source Code Pro'; font-size: 11px; color:
rgb(147, 26, 104);"><b>true</b></span><span
style="font-family: 'Source Code Pro'; font-size: 11px;">)</span></div>
<div><br>
</div>
<div>Any hint would be much appreciated ;-)</div>
<div><br>
</div>
<div>Thanks in advance.<br>
<div>
<span class="Apple-style-span" style="border-collapse:
separate; border-spacing: 0px;"><span
class="Apple-style-span" style="border-collapse: separate;
color: rgb(0, 0, 0); font-family: Helvetica; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode:
space; -webkit-line-break: after-white-space; ">Best
regards,</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode:
space; -webkit-line-break: after-white-space; ">/Xavier<br>
<br>
<br>
</div>
</span></span>
</div>
<br>
<div>
<div>On 03 Jun 2014, at 16:48, Victor Rubezhny <<a
moz-do-not-send="true" href="mailto:vrubezhny@exadel.com">vrubezhny@exadel.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">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.<br>
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.<br>
<br>
How I can look at how and where your validator is
plugged in into the <span style="color: rgb(20, 20,
20); line-height: 14px;">org.jboss.tools.common.validation.ValidationErrorManager?<br>
<br>
Regards,<br>
Victor<br>
</span><br>
On 06/03/2014 06:20 PM, Xavier Coulon wrote:<br>
</div>
<blockquote
cite="mid:15268417-FCB1-4887-9157-3774622CB269@redhat.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Hello,
<div><br>
</div>
<div>My JAX-RS validator is based on our <span
style="color: rgb(20, 20, 20); line-height: 14px;">org.jboss.tools.common.validation.ValidationErrorManager,
but it is currently triggered when the user saves a
file or during a full build, only. </span></div>
<div><span style="color: rgb(20, 20, 20); line-height:
14px;">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 ?</span></div>
<div><span style="color: rgb(20, 20, 20); line-height:
14px;"><br>
</span></div>
<div><span style="color: rgb(20, 20, 20); line-height:
14px;">Thanks.</span></div>
<div>
<div apple-content-edited="true"> <span
class="Apple-style-span" style="border-collapse:
separate; border-spacing: 0px;">
<div style="word-wrap: break-word;
-webkit-nbsp-mode: space; -webkit-line-break:
after-white-space;">Best regards,</div>
<div style="word-wrap: break-word;
-webkit-nbsp-mode: space; -webkit-line-break:
after-white-space;">/Xavier<br>
<br>
<br>
</div>
</span> </div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
jbosstools-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a></pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
jbosstools-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a><br>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>