Q:

Handling Roo generated AspectJ files in Eclipse

I have generated a sample roo project using command prompt and then imported it to the eclipse.But i found that most of the important files are in aj extension.How can i change these files into java files.I want to do this in eclipse.

A:

If you want the .aj files to show up in the Project Explorer:

Click on the down arrow on the top right corner of the Project Explorer panel.
Choose Customize View...
In the Filters tab, uncheck Hide generated Spring Roo ITDs

(I found this question searching for how to do this, so I wrote it here)

A:

First of all, you do not have to convert the .aj files to java. They are Roo generated aspects which does the magic behind Roo.
You should not modify or delete Roo generated .aj files. If you want to override the behavior of them, you should "Push In" refactor the methods to the necessary java files or you can simply create methods with the same method signature in the related java file. Roo will automatically modify the .aj file and remove the overridden method from the .aj file. Remember, you need to have the Roo shell running in order for this to happen or it would happen the next time you start the Roo shell.
To use the "Push In" refactoring feature, you can use AJDT for eclipse, which is often the preferred plugin for AspectJ related development in Eclipse.
Cheers.

A:

.aj files are not Java files. They are AspectJ files. These can be removed and everyhting can be moved into Java files but you won't be able to continue using Roo to handle the project changes.
There are plugins for Eclipse to handle those files from the IDE. I've mostly used the SpringSource Tool Suite which is a packaged version of Eclipse that has (among other things) the proper tools to work with Roo. 

