Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Push in refactor in STS 3.5.0 -> "No crosscutting model"

  1. #11
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    750

    Default

    After all, post-compilations all members from the Java source file and its corresponding AspectJ files end up in one java class file and all members there must be assumed to be reachable within this class, just as with regular java-files, no?
    Not exactly. ITD members are not pushed into the target type during compilation. Internally (and this is rather unimportant from a user's perspective), aspectj will create accessors with appropriate modifiers for all of its ITDs so that target types can reference them.

    It is confusing to think of AspectJ as a pre-processor that simply adds a few extra members (for ITDs) and adds a few code instructions (for advice). Thinking this way, you will miss some subtleties of the language (such as access modifiers for ITDs). Rather, you should be thinking of AspectJ in terms of the aspects and crosscutting concerns (try to avoid the impulse to mentally perform weaving).

    This is not an easy thing to do, and takes lots of practice with the language, so I am not faulting you. If you are interested in really learning to think in aspects, then I'd recommend AspectJ in Action (second edition).

    ps- I'm not exactly sure if I answered your question. So, please rephrase if there's anything I didn't make clear.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  2. #12
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Quote Originally Posted by Andrew Eisenberg View Post
    If you are interested in really learning to think in aspects, then I'd recommend AspectJ in Action (second edition).
    I'm making a note of your suggestion and that title is certainly on my planned reading list, but I have 10 other titles in the loop ahead of this one.

    Quote Originally Posted by Andrew Eisenberg View Post
    ps- I'm not exactly sure if I answered your question. So, please rephrase if there's anything I didn't make clear.
    I got the most relevant parts at least. Thank you for taking the time to explain.

    There's a lot to get your head around with all the Spring and related projects – currently learning while developing with the core Framework, MVC, Web Flow, jspx, Tiles, log4j as well as JPA and Hibernate within the constraints and suggested practices by Roo – but I'm liking it more and more as I go along.
    Last edited by MiB; Mar 8th, 2011 at 07:30 PM.

  3. #13
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    750

    Default

    The best way to learn is to dive right in.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  4. #14
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Well, I'm currently quite submerged like a free diver.

  5. #15

    Thumbs up

    Quote Originally Posted by delgad9 View Post
    Hello Andrew,
    In one of my many tries: I deactivate and active the JDT Weaving and suddenly started to work.
    jD
    Hi all,
    I have solve this issue by this way.

    Preferences -> JDT weaving -> Click on Reindex now

    That has worked fine for me.

    Saludos,
    Ezequiel

  6. #16
    Join Date
    Jan 2013
    Posts
    2

    Default

    I want to do push in in my Spring Roo project because I want to leave Roo behind but I obtain the no crosscutting model available dialog. I tried doing a project->clean but I obtain the same error. Does Anyone know how can I fix this? I'm using STS 3.1.0.

  7. #17
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    As you probably read on the first page of this thread you need to complete a build including AspectJ generation within STS — and not with a maven command, which how I did this back when — in order to have a crosscutting model. I assume you have done this however?

    What do errors if any you have in the markers view? Have you verified that JDT weaving is active on your project? If there's no crosscutting model chances are there have been some kind of build error, so you should look carefully at log files for this.

    Also, I've successfully started over similar projects and transfered my java source files to the new project in the past to solve similar issues. Sometimes Roo projects break. My solution have been to commit to my project repository for every major step, including the itd-files generated from AspectJ.
    Last edited by MiB; Jan 31st, 2013 at 05:16 AM. Reason: clarification

  8. #18
    Join Date
    Jan 2013
    Posts
    2

    Default

    Thank you for your help. I've already solved my problem, I had a missing folder 'Project/src/test/resources' and because of that STS couldn't build my project. I created the directory and did a 'project->clean', then I did a 'project->build' and finally I could do the 'push-in'. I created a second project and I realized that my second project does not have the same folder which my first project didn't have. Could it be a problem of my STS?

  9. #19
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    750

    Default

    There may be something funny going on. How did you create the project? If I can follow the same steps, I can figure out if there is a problem with STS.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  10. #20
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Quote Originally Posted by jeserrato View Post
    I had a missing folder 'Project/src/test/resources' [.......]
    Could it be a problem of my STS?
    I'd say not as I've encountered that particular issue with Roo 1.2 multiple times. I'm on OS X Lion 10.7.4 with build java 1.6.0_37-b06-434-11M3909. What JVM are you running in?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •