Announcement Announcement Module
No announcement yet.
Suggestion for Spring Roo wedding rsvp blog article Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Suggestion for Spring Roo wedding rsvp blog article

    Hi Ben,

    Just a quick suggestion for the blog article which was great fun.

    I think it should be mentioned that ajdt weaving should be enabled in STS/Eclipse in order to avoid compile errors when working through the code modifications in the blog article. Not knowing this caused these compile errors and when I switched ajdt weaving on and restarted STS it was all fine. Mentioning this at the outset would save time.


  • #2
    Thanks for the suggestion. I've updated my wedding tutorial blog accordingly:

    When prompted by AJDT whether you'd like to enable JDT weaving, select to enable weaving. This will result in a better Roo experience when using Eclipse's Java editor.


    • #3
      I've also updated the reference guide section with the following text (ROO-503 svn rev 566):

      When using AJDT you may be prompted whether to enable weaving of the JDT. You should select to enable weaving so as to ensure the Java Editor in Eclipse (or STS) gives the best AspectJ-based experience. You can also verify this setting is active by loading Eclipse (or STS) and selecting Window > Preferences > JDT Weaving.


      • #4
        Thanks. I have one question however. You mention that this Eclipse setting gives a better roo/aspectj experience. In my experience while working through the wedding app it wasn't merely an improvement but a necessity because without weaving enabled the pojo and finder methods simply didn't exist and could not be resolved at compile time. Am I right? Is there another way of getting the code to compile without enabled ajdt weaving?


        • #5
          It should still compile OK without enabling JDT weaving. The JDT weaving modifies the JDT (which provides access to the type model used by the Java Editor) so it includes members introduced in ITDs. So not enabling JDT weaving will still result in AJDT compiling, assuming the AJDT nature is active on the project.


          • #6
            Okay. In my case by default after importing the roo project and make the code modifications the code wasn't compiling so I guess the nature wasn't enabled. After enabling weaving it compiled so that may have enabled the nature. Not sure what the project configuration was at the time as I didn't think to check. This was a stumbling block for me in that example app.


            • #7
              What you may have seen is that without JDT Weaving being enabled, there are errors being highlighted in the editor. But, these are editor errors only (or more precisely, reconciling errors) and your code is compiling just fine.

              As Ben mentions, JDT weaving augments the JDT tool support so that the AspectJ model can play nicely with the Java model. The AspectJ compiler is unaffected by it.