4

Is there a faster way to push in multiple methods from Roo-generated aspects to Java classes than doing them one at a time in an IDE that supports the operation?

I want to push in all methods from the aspects generated because of a specific Roo annotation as painlessly as possible.

2 Answers 2

2

In STS or Eclipse, you can probably do this with the "Outline" view.

  1. Open up the .aj file that Spring Roo generated.
  2. Find the "Outline" view.
  3. Select all of the methods that you want to push-in.
  4. Right-click them, "Refactor, Push In"

If you're having trouble getting the Roo created .aj files to show up in Package Explorer, look for the little down-arrow, go into "Filters..." and turn off the "Hide generated Spring Roo ITDs" box.

1

Have you tried removing the AspectJ nature from your project? Or you can also remove the SpringROO nature directly. That will remove all your .aj files and all the methods will be transfered to the actual class files. In STS you can choose this option from right click menu of your project. If your IDE is slow then you can do this from ROO shell from command prompt.

Hope this helps you. Cheers.

2
  • Good suggestion -- unfortunately I don't want to remove all my .aj files. Just the ones pertaining to, say, @RooDbManaged
    – Derek
    Commented Sep 19, 2012 at 16:10
  • ok... I didn't know about that. You need to find some other way around. :) Commented Sep 20, 2012 at 4:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.