JBoss Community

JBoss Tools Development Environment

modified by Nick Boldt in JBoss Tools Development - View the full document

 

This article explains the different steps to set up a 1st-class environment when you want to write code for JBoss Tools

 

Tools and technologies

Java

JBoss Tools requires Java 6. Ensure your JRE and JDK are compatible with Java 6

 

Eclipse PDE/RCP

JBoss Tools are a set of plugins for Eclipse. Then get your favourite recent version of Eclipse from here: http://eclipse.org/downloads/ We recommand you using Eclipse for RCP and RAP Developers. But you can also install PDE in any other installation of Eclipse:

 

https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18124-5-18511/450-477/installPDE.png

SVN

You'll need to install a recent version of SVN (1.6 or more recent). Then you should install SVN Tools in Eclipse.  You are free to choose your favourite Eclipse plugin and SVN connector by yourself, however, curret author of this page recommands using Subversive (part of the Eclipse latest release site) with SVNKit connector. Feel free to install Subversive extensions for other projects, it's always helpful.

 

Tips for productivity and quality

Here are some highly recommanded plugins that will make your more efficient when inside the IDE

Install Code Recommanders

Provides additional snippets, templates and smart completion. Not intrusive. You can find it on the "Juno" update-site or the current Eclipse release site.

 

Static analysis

Static analysis will detect bug very early and will save you minutes of debug every day. Using it will make you and your colleagues happier. It tells you while typing code that you may have a bug. No need to wait for running test or CI reports to detect this.

Enable all JDT warnings

JDT provides very good static analysis, and can prevent you from writing bugs. You simply have to turn all "ignored" advices to "warning" in Window > Preference > Java > Compiler > Errors/Warning.

 

https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18124-5-18512/450-431/jdtWarnings.png

Install Findbugs for Eclipse

http://marketplace.eclipse.org/content/findbugs-eclipse-plugin

Install PMD for Eclipse

http://marketplace.eclipse.org/content/pmd-eclipse

 

Coverage

Coverage answers to the question "What is tested or net?".

JBoss Tools CI builds provide Jacoco reports for coverage by unit tests (file name is jacoco.exec). This file can easily be analyzed inside Eclipse on your Java editor using EclEmma plugin: http://marketplace.eclipse.org/content/eclemma-java-code-coverage

 

Get source

Each JBoss Tools component is now its own GitHub repo: https://github.com/jbosstools/

To work on a specific component

The easiest way to get started is to check out source for only the module you wish to work on, and import Java projects from this part of the source tree.

Example:

* I  want to fix a bug in CDI component of JBT: git clone git://github.com/jbosstools/jbosstools-server.git and import plugins and tests projects from plugns/* and tests/*

 

Set up a target platform

Target platforms (TP) are aimed at specifying what are the dependencies allowed and used to write, compile and execute code. Target Platform=Build Path + Default Runtime Classpath. We provide several TP that have different purpose. We do set up some default TP for development, that you should use.

Import target platforms

Import into your Eclipse workspace JBoss Tools target platforms from GitHub:

 

git clone git://github.com/jbosstools/jbosstools-build.git

 

You can then build a specific target platform like this:

 

cd jbosstools-build/target-platforms/jbosstools-JunoSR1a/; mvn clean install

Choose and use a target platform

Then go into Window > Preference > Plug-in development > Target Platform. We recommend you to use multiple.target since it will contain all deps allowed from 3rd-party (Eclipse, Google...) AND SOURCE BUNDLES. If you don't depend on any other JBoss Tools project, please use unified.target.

https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18124-5-18513/450-333/TP.png

 

Run JBoss Tools and Tests from your IDE

Once Target Platform is configured, you can easily give a try to your plugins using Run As > Java Application. You can also run automated tests from your IDE using Run As... > JUnit Plugin Tests.

Comment by going to Community

Create a new document in JBoss Tools Development at Community