[jboss-dev-forums] [JBoss Tools Development] - JBoss Tools Development Environment

Mickael Istria do-not-reply at jboss.com
Fri Feb 1 04:21:29 EST 2013


Mickael Istria [https://community.jboss.org/people/mickael_istria] modified the document:

"JBoss Tools Development Environment"

To view the document, visit: https://community.jboss.org/docs/DOC-18124

--------------------------------------------------------------
* 
 #Tools_and_technologies Tools and technologies


** 
 #Java Java


** 
 #Eclipse_PDERCP Eclipse PDE/RCP


** 
 #Git_and_EGit Git and EGit


** 
 #m2e m2e


** 
 #Tips_for_productivity_and_quality Tips for productivity and quality


*** 
 #Install_Code_Recommanders Install Code Recommanders


*** 
 #Static_analysis Static analysis


**** 
 #Enable_all_JDT_warnings Enable all JDT warnings


**** 
 #Install_Findbugs_for_Eclipse Install Findbugs for Eclipse


**** 
 #Install_PMD_for_Eclipse Install PMD for Eclipse


*** 
 #Coverage Coverage


* 
 #Get_source Get source


** 
 #To_work_on_a_specific_component To work on a specific component


* 
 #Set_up_a_target_platform Set up a target platform


* 
 #Run_JBoss_Tools_and_Tests_from_your_IDE Run JBoss Tools and Tests from your IDE




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

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

h2. 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/ 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/showImage/102-18124-6-18511/installPDE.png  https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18124-6-18511/450-477/installPDE.png 

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

h2. 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+.
 https://community.jboss.org/servlet/JiveServlet/showImage/102-18124-6-20251/m2e-tycho.png  https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18124-6-20251/450-341/m2e-tycho.png 

h2. Tips for productivity and quality
Here are some highly recommanded plugins that will make your more efficient when inside the IDE

h3. 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.
h3. 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.
h4. 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/showImage/102-18124-6-18512/jdtWarnings.png  https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18124-6-18512/450-431/jdtWarnings.png 
h4. Install Findbugs for Eclipse
 http://marketplace.eclipse.org/content/findbugs-eclipse-plugin http://marketplace.eclipse.org/content/findbugs-eclipse-plugin
h4. Install PMD for Eclipse
 http://marketplace.eclipse.org/content/pmd-eclipse http://marketplace.eclipse.org/content/pmd-eclipse

h3. 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 http://marketplace.eclipse.org/content/eclemma-java-code-coverage

h1. Get source
Each JBoss Tools component is now its own GitHub repo:  https://github.com/jbosstools/ https://github.com/jbosstools/ 
h2. 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/*

h1. 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 target platform 4.2.0.c.

cd jbosstools-target-platforms
git checkout 4.2.0.c


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+
 +https://community.jboss.org/servlet/JiveServlet/showImage/102-18124-6-20254/setTp.png  https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18124-6-20254/450-355/setTp.png 
+

h1. 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
[https://community.jboss.org/docs/DOC-18124]

Create a new document in JBoss Tools Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2129]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130201/9c758769/attachment-0001.html 


More information about the jboss-dev-forums mailing list