JBoss Tools Development Environment

Version 7

     

    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:

     

    installPDE.png

     

    Git and EGit

    Install Git CLI, and install EGit in Eclipse (EGit is already provided in most Eclipse installations).

     

    m2e

    m2e (maven integation for Eclipse) is also required. It's recommended that you also install m2e-tycho and m2e-EGit connector from Preferences > Maven > Discovery > Open Catalog.

    m2e-tycho.png

     

    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.

     

    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 Platform = Allowed Dependencies We provide several TP that have different purpose. We do set up some default TP for development, that you should use. You should use those Target Platforms instead of installing the dependencies in your IDE. Then you IDE becomes "The tools you need to develop" whereas the Target Platform provides the dependencies.

     

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

    git clone git://github.com/jbosstools/jbosstools-target-platforms.git

    Then select the version you want for the target platform. Those versions are available as tags. You can see the list of tags with git tag -l.

    Let's say for this example we want the latest target platform based on Eclipse 4.2.1 (Juno SR1).

    cd jbosstools-target-platforms

    git checkout 4.2.1

     

    Then, in Eclipse, Import > Existing Maven Project, browse to the jbosstools-target-platfroms/jbosstools/multiple.

    Double-click on multiple.target, and click Set As Target Platform

    setTp.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.