Configure Eclipse
Configure Eclipse to view Sonar reports
- Install sonar plug-in:
- marketplace
- site update: http://dist.sonar-ide.codehaus.org/eclipse/
- Configure the connection to sonar:
- Go to Window -> Preferences -> Sonar -> Servers
- Add new server:
- url= http://gazelle.ihe.net/sonar
- Then, for each project you need to activate the sonar plug-in:
- Right-click on project -> configure -> Associate with sonar...
- (Optional) Add a Sonar view
- Window -> Show view -> sonar -> violations
Java code formatting in Eclipse
Download the formatting file available here and add it to your Eclipse configuration. Go to Window --> Preferences. Then select Java --> Code Style --> Formatter and click on the Import... button.
To format all the sources of a given project, right-click on the src/main/java directory and select Sources --> Format
Auto-completion of XHTML tags
If you want Eclipse to auto-complete the tags of your XHTML files and to give you the list of available attributes for a tag, read this tutorial. In addition, to have the rich and a4j tags listed, you can create a user library and add richfaces-api, richfaces-impl et richfaces-ui. You will find those binaries in your .m2 repository in /org/richfaces/framework and /org/richfaces/ui folders.
Template for loggers
We recommand to use sl4j for logging information in JBoss logs. Download the file available here and add it as a template in Eclipse (see the screenshot below). Then, each time you want to insert a logger in your Java class, type "logg" and ctrl-space for completion. A static field will be created and the logs will be redirected to log4j in JBoss.