<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">See
      CDICoreValidator.validateBuilderOrder(IProject) for example.<br>
      And BTW how do you add your builder to the project?<br>
      We created a special util method
      WebModelPlugin.addNatureToProjectWithValidationSupport(IProject
      project, String builderId, String natureId) which we use to add
      our natures/builders for projects with enabled validation.<br>
      This method adds the nature/builder and reorders existing builders
      (if needed) to make sure we have the following order: 1) Java
      Builder; 2) Our builder; 3) WST validation Builder.<br>
      <br>
      On 10/18/2012 11:50 PM, Xavier Coulon wrote:<br>
    </div>
    <blockquote
      cite="mid:9E259C19-8FC0-49F8-8BB6-7C1FA43888D0@redhat.com"
      type="cite">Hi Alexey !
      <div><br>
      </div>
      <div>Yes, I use a specific builder for my JAX-RS metamodel, and as
        you guessed, it was configured *after* the WST Validation
        Builder.&nbsp;</div>
      <div>As you guessed, once the builders are in proper order in the
        .project file, the JAX-RS validation is triggered as expected at
        the end of the import operation ;-) &nbsp;</div>
      <div><br>
      </div>
      <div>I'm interested in the way our common validation framework can
        help me to validate the order of the builders: do you have any
        example ?</div>
      <div><br>
      </div>
      <div>Once again, thanks very much for your help !</div>
      <div><br>
      </div>
      <div>Best regards,<br>
        <div>
          <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; font-size: medium; ">/Xavier<br>
            <br>
            <br>
          </span>
        </div>
        <br>
        <div>
          <div>On Oct 18, 2012, at 9:58 PM, Alexey Kazakov 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">Hi Xavier,<br>
                <br>
                How do you build JAX-RS model? Is there any builder for
                that?<br>
                Common validator manager is invoked by WST validation
                builder. So if you use some builder for JAX-RS then make
                sure it's added to .project before WST validation
                builder. BTW our common validation framework can help
                you to validate the order of the builders.<br>
                If you don't use some builder for building JAX-RS model
                then you have to build it in your validator.<br>
                <br>
                <br>
                On 10/18/2012 06:42 AM, Xavier Coulon wrote:<br>
              </div>
              <blockquote
                cite="mid:841A23DB-135E-41E1-A9FD-0FC7DA2DC518@redhat.com"
                type="cite">Hello,
                <div><br>
                </div>
                <div>I'm facing an issue here (<a moz-do-not-send="true"
                    href="https://issues.jboss.org/browse/JBIDE-12690">https://issues.jboss.org/browse/JBIDE-12690</a>)
                  which basically says that the imported project is not
                  correctly validated. It has JAX-RS errors but nothing
                  is reported after the import operation.</div>
                <div><br>
                </div>
                <div>In my console logs, I have the following traces:</div>
                <div><br>
                </div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:13.714 [Worker-9]
                    Building JAX-RS Metamodel after Java element
                    changed...</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:13.715 [Worker-9]
                    Some java elements changed:[PostChange]&nbsp;</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:13.715 [Worker-9]
                    **rejected** JavaElementDelta [PostChange] JavaModel
                    '' [*without* AST] changed:{Children}]</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:13.715 [Worker-9]
                    **rejected** JavaElementDelta [PostChange]
                    JavaProject 'jboss-richfaces-webapp' [*without* AST]
                    changed:{Content}]</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:13.715 [Worker-9]
                    Processing 0 change(s)...</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:13.715 [Worker-9]
                    Done processing Java changes.</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" color="#b40f00" face="'Courier New'">14:43:14.721
                    [Worker-1] *** Validating all JAX-RS elements in
                    project jboss-richfaces-webapp ***</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:14.731 [Worker-1]
                    Validation done.</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">...</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">...</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">...</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">!MESSAGE Building JAX-RS
                    metamodel for project jboss-richfaces-webapp</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:24.703 [Worker-11]
                    Initiating a JAX-RS Metamodel build on project
                    'jboss-richfaces-webapp' after resource changed
                    event
org.eclipse.core.internal.events.ResourceChangeEvent[source=P/jboss-richfaces-webapp]</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:24.704 [Worker-0]
                    Building JAX-RS Metamodel after resource changed...</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:24.713 [Worker-0]
                    JAX-RS Metamodel created for project
                    jboss-richfaces-webapp</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:24.717 [Worker-0]
                    Processing project 'jboss-richfaces-webapp'...</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:24.718 [Worker-0]
                    <font class="Apple-style-span" color="#4d7b2e">Processing

                      ResourceChangedEvent [Project
                      '/jboss-richfaces-webapp' added]</font></font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.686 [Worker-0]
                    Indexing JavaApplication 'JaxRsActivator':
                    path=/rest</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.797 [Worker-0]
                    Indexing Resource 'MemberResourceRESTService'
                    (root=true)&nbsp;</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.800 [Worker-0]
                    Indexing ResourceMethod
                    'MemberResourceRESTService.lookupMemberById'
                    (SUBRESOURCE_METHOD)</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.801 [Worker-0]
                    Indexing ResourceMethod
                    'MemberResourceRESTService.createMember'
                    (RESOURCE_METHOD)</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.801 [Worker-0]
                    Indexing ResourceMethod
                    'MemberResourceRESTService.listAllMembers'
                    (RESOURCE_METHOD)</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.802 [Worker-0]
                    Resulting event: JaxrsElementChange: [Application
                    Added] JaxRsActivator</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.803 [Worker-0]
                    Resulting event: JaxrsElementChange: [Resource
                    Added] MemberResourceRESTService</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.806 [Worker-0]
                    Processing ResourceChangedEvent [File
                    '/jboss-richfaces-webapp/src/main/webapp/WEB-INF/web.xml'
                    added]</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.902 [Worker-0]
                    No servlet mapping found for class
                    'org.jboss.tools.example.richfaces.rest.JaxRsActivator'
                    in file 'src/main/webapp/WEB-INF/web.xml'</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.911 [Worker-0]
                    No servlet mapping found for class
                    'javax.ws.rs.core.Application' in file
                    'src/main/webapp/WEB-INF/web.xml'</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.911 [Worker-0]
                    Done processing resource results.</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.911 [Worker-0]
                    Processing 2 JAX-RS element change(s)...</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.911 [Worker-0]
                    Processing JaxrsElementChange: [Application Added]
                    JaxRsActivator</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.911 [Worker-0]
                    Processing JaxrsElementChange: [Resource Added]
                    MemberResourceRESTService</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.915 [Worker-0]
                    --&gt; JaxrsEndpointChange: [Added] GET
                    /rest/members/{id:[0-9][0-9]*} | consumes:[*/*] |
                    produces=[application/json] in method
                    MemberResourceRESTService.lookupMemberById(...)</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.915 [Worker-0]
                    --&gt; JaxrsEndpointChange: [Added] POST
                    /rest/members | consumes:[application/json] |
                    produces=[application/json] in method
                    MemberResourceRESTService.createMember(...)</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.915 [Worker-0]
                    --&gt; JaxrsEndpointChange: [Added] GET
                    /rest/members | consumes:[*/*] |
                    produces=[application/json] in method
                    MemberResourceRESTService.listAllMembers(...)</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.915 [Worker-0]
                    Done processing JAX-RS element change(s).</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.916 [Worker-0]
                    *** Notifying the UI that JAX-RS metamodel was Added
                    (including 3 endpoint changes) ***</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:27.917 [Worker-0]
                    JAX-RS Metamodel for project
                    'jboss-richfaces-webapp' now has 6 HttpMethods, 1
                    Resources and 3 Endpoints.</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:43:28.136 [Worker-0]
                    Validation done.</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'"><br>
                  </font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" color="#ff3816" face="'Courier New'">14:44:59.105
                    [Worker-1] *** Validating some JAX-RS elements bound
                    to files
                    [L/jboss-richfaces-webapp/target/test-classes/arquillian.xml,
                    L/jboss-richfaces-webapp/target/test-classes/META-INF/test-persistence.xml,

                    L/jboss-richfaces-webapp/target/test-classes/test-ds.xml]
                    that just changed in project
                    jboss-richfaces-webapp... ***</font></div>
                <div><font class="Apple-style-span" style="font-size:
                    11px;" face="'Courier New'">14:45:11.719 [Worker-1]
                    Validation done.</font></div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>The problem I've spotted is that the JAX-RS
                  validator is called twice: the first time to validate
                  *all* the JAX-RS elements, but this call occurs
                  *before* the JAX-RS metamodel was built, because none
                  of the events that were caught by the listener in the
                  plugin were 'eligible' to build the JAX-RS metamodel.&nbsp;</div>
                <div>[moving a bit forward during the import operation
                  -&gt; some logs were removed]</div>
                <div>Then, once the listener caught a
                  "ResourceChangedEvent" about the ADDED project, the
                  JAX-RS metamodel is built, but the validator is called
                  for only a couple of .xml files that changed, not the
                  whole project that was imported.</div>
                <div>How could I trigger a 'validateAll' in this case ?</div>
                <div><br>
                </div>
                <div>Thanks</div>
                <div>Best regards,</div>
                <div><br>
                  <div apple-content-edited="true"> /Xavier<br>
                    <br>
                    <br>
                  </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>