<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 06/03/2014 10:17 AM, Victor Rubezhny
wrote:<br>
</div>
<blockquote cite="mid:538E0327.4050302@exadel.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<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>
</div>
</blockquote>
This is correct. See my previous email.<br>
We should have mentioned this in the javadoc of IAsYouTypeValidator.<br>
<br>
<blockquote cite="mid:538E0327.4050302@exadel.com" type="cite">
<div class="moz-cite-prefix"> <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>
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>
</div>
</blockquote>
<br>
Any implementation of IAsYouTypeValidator gets a set of the changed
regions of the file. It's up to particular validator how to validate
these regions. If you implement IJavaElementValidator you will get a
set of the regions of the changed java elements (if any). If you
implement IStringValidator you will get a set of all changed Strings
of the java type in case of *.java file (provided by our
JavaDirtyRegionProcessor) or the set of all the changed regions of
the structured document in case of xml/html/xhtml/jsp files
(provided by Eclipse WST validator). You can't validate other
resources using our as-you-type validation framework. It supposed to
be used only for java/xml/html/xhtml/jsp resources.<br>
<br>
<blockquote cite="mid:538E0327.4050302@exadel.com" type="cite">
<div class="moz-cite-prefix"> <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>
<blockquote cite="mid:538E0327.4050302@exadel.com" type="cite">
<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 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></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
jbosstools-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a>
<a 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>
</body>
</html>