1.3. Eclipse IDE (Eclipse 4.5.2 “Mars SR2”) - install and configure¶
This section describes how to install and configure the Eclipse IDE. See Installing a previously-configured Eclipse if you want to use a pre-configured version.
Instructions are provided for Eclipse 4.5.2 (“Mars SR2”).
1.3.1. Install and configure Eclipse¶
1.3.1.1. Install Eclipse for RCP and RAP Developers¶
- Download Eclipse 4.5.2 (“Mars SR2”) “Eclipse for RCP and RAP Developers” from http://www.eclipse.org/downloads/.(Note: At this stage, use of the Eclipse installer is incompatible with the way we use Buckminster, so don’t use it).Use of a 64-bit OS (and 64-bit Java and Eclipse) is strongly recommended. We only support DAWN and GDA on 64-bit, so it makes sense that you develop on that.
The description below assumes Linux, but the same procedure can be used for Windows.
Unzip the downloaded file:
download=/dls_sw/dasc/eclipse_IDE_downloads/eclipse-rcp-mars-2-linux-gtk-x86_64.tar.gz arch=64 eversion=452 unpacked=/scratch/eclipse${eversion} mkdir -v ${unpacked} tar -zxf ${download} -C ${unpacked} today=$(date +"%Y%m%d") mv -v ${unpacked}/eclipse ${unpacked}/eclipse${eversion}_linux${arch}_${today}
In the unzipped directory, edit
eclipse.ini(usegedit ${unpacked}/eclipse${eversion}_linux${arch}_${today}/eclipse.ini &or equivalent):Add the following line immediately above
-vmargs:-showLocation
Add the following line immediately after
-vmargs:-Dfile.encoding=UTF-8
Change the minimum Java version to 1.8:
-Dosgi.requiredJavaVersion=1.8
Delete the backup file:
rm ${unpacked}/eclipse${eversion}_linux${arch}_${today}/eclipse.ini~Start the Eclipse IDE using the following command line options (use a new workspace):
# Ensure that the correct Java (Java 8) is on the path module load java/gdamaster # at Diamond Light Source java -version # If you use a network proxy, and are on Linux, ensure environment variables $http_proxy/$https_proxy/$no_proxy are set module load global/http_proxy # at Diamond Light Source printenv | grep "_proxy=" ${unpacked}/eclipse${eversion}_linux${arch}_${today}/eclipse -refresh &
At , de-select
Build automatically- If you need to specify a network proxy, the best way on Linux is to set environment variables
$http_proxy/$https_proxy/$no_proxybefore starting Eclipse.Alternatively, or if you are on Windows, specify the network proxy within Eclipse, at Run and restart if necessary
Once you have installed Eclipse, you will need to install a number of additional features. Be sure to restart Eclipse when prompted after each install.
1.3.1.2. EGit/JGit (Eclipse IDE Git adapter) update¶
The version of EGit/JGit bundled with Eclipse Mars SR2 is 4.1.1. Update it to 4.2.0 (or whatever the latest at https://www.eclipse.org/egit/download/ is).
At , enable (adding first if necessary):
http://download.eclipse.org/egit/updates
At , select the site you just added, and install:
Eclipse Git Team Provider Eclipse Git Team Provider Eclipse Git Team Provider - Task focused interface JGit Java implementation of Git
1.3.1.3. Subclipse (Eclipse IDE Subversion adapter)¶
Note
This addition to the Eclipse IDE is optional, but recommended for developers located at Diamond Light Source (external developers do not require this)
Subclipse).We will install Subclipse 1.10.x, which includes and requires Subversion 1.8.x client (not server) features and working copy format:
module load subversion/1.8.13 # at Diamond Light Source, if you need a subversion command line client
At , enable (adding first if necessary):
http://subclipse.tigris.org/update_1.10.x
At , select the site you just added, and install:
Subclipse Subclipse (Required) Subclipse Client Adapter (Required) Subversion JavaHL Native Library Adapter SVNKit JNA Library SVNKit Client Adapter SVNKit Library
- At , and under SVN Interface: Client, select an available client.
SVNKitis the most portable, so if you a creating a shared install, that’s probably the most appropriate. It can be changed later if required.Whichever client you select, be sure to read the notes on Subversion security.
1.3.1.4. Buckminster¶
Note
This addition to the Eclipse IDE is REQUIRED for Dawn and GDA development
Subclipse and Subversive support, matching the Eclipse Subversion adapter you installed previously.At , enable (adding first if necessary):
http://download.eclipse.org/tools/buckminster/updates-4.5
At , select the site you just enabled, and install:
Buckminster Buckminster - Core Buckminster - Git Support Buckminster - Maven Support Buckminster - PDE support Buckminster SVN Support (Subclipse) Buckminster - Subclipse support # optional, only select if you installed Subclipse in the previous step
1.3.1.5. PyDev¶
Note
This addition to the Eclipse IDE is optional, but recommended for Dawn and GDA development
PyDev is recommended for development work with Python and Jython.
At , find “PyDev” and install these items:
PyDev - Python IDE for Eclipse PyDev for Eclipse
1.3.1.6. Spring IDE¶
Note
This addition to the Eclipse IDE is optional, but recommended for GDA development
Spring IDE is recommended for development work with Spring configurations. The Spring IDE is a a subset of the larger Spring Tool Suite.
- At , find “Spring IDE Eclipse 3.7.3.RELEASE” and install the required components
1.3.1.7. FindBugs¶
Note
This addition to the Eclipse IDE is optional, but recommended for Dawn and GDA development
FindBugs uses static analysis to look for bugs in Java code.
At , enable (adding first if necessary):
http://findbugs.cs.umd.edu/eclipse/
At , select the site you just enabled, and install:
FindBugs FindBugs feature
1.3.1.8. ObjectAid UML Explorer¶
Note
This addition to the Eclipse IDE is optional, but recommended for Dawn and GDA development
ObjectAid UML Explorer is a code visualization tool for the Eclipse IDE.
At , enable (adding first if necessary):
http://www.objectaid.net/update
At , select the site you just enabled, and install:
ObjectAid UML Explorer ObjectAid Class Diagram
1.3.1.9. vogella e4 tools¶
Note
This addition to the Eclipse IDE is optional, but is being trialled to see if it is useful for Dawn and GDA development
vogella e4 tools provides e4 tools for Eclipse RCP development.
At , enable (adding first if necessary):
https://dl.bintray.com/vogellacompany/e4tools-mars
At , select the site you just enabled, and install all available items
1.3.1.10. Gonsole¶
Note
This addition to the Eclipse IDE is optional, but is being trialled to see if it is useful for Dawn and GDA development
Gonsole provides a Git Console for the Eclipse IDE
At , enable (adding first if necessary):
https://rherrmann.github.io/gonsole/repository/
At , select the site you just enabled, and install:
Gonsole - Git Console for Eclipse Gonsole - EGit Integration Gonsole - Git Console for Eclipse
1.3.2. Publish the Eclipse IDE¶
Note: This step only needs to be done by the build engineer.
You should install and configure the Eclipse IDE for both Linux (64-bit) and Windows (64-bit).
Once you have installed and configured the Eclipse IDE, zip it and copy to a shared network drive, so that developers can take a local copy.
Restart the IDE with the -clean option:
${unpacked}/eclipse${eversion}_linux${arch}_${today}/eclipse -clean -refresh &At
all recent workspacesChange Number of recent workspaces to remember to 10
tar/zipthe distribution:# environment variables that are probably already defined arch=64 eversion=452 unpacked=/scratch/eclipse${eversion}/ today=$(date +"%Y%m%d") # check environment and publish echo "eversion=${eversion} unpacked=${unpacked} arch=${arch} today=${today}" packed=/scratch/eclipse${eversion}_linux${arch}_${today}.tar.gz cd ${unpacked}/ find eclipse${eversion}_linux${arch}_${today}/ -name ".keyring" -print -delete tar -zcf ${packed} eclipse${eversion}_linux${arch}_${today}/ cp -pvi ${packed} /dls_sw/dasc/eclipse_IDE_Diamond/ ls -la /dls_sw/dasc/eclipse_IDE_Diamond
install the distribution into the
modulessystem:tarball=/dls_sw/dasc/eclipse_IDE_Diamond/eclipse${eversion}_linux${arch}_${today}.tar.gz install=/dls_sw/apps/eclipse tar -zxf ${tarball} -C ${install} java -version ${install}/eclipse${eversion}_linux${arch}_${today}/eclipse -initialize chmod -R a-w ${install}/eclipse${eversion}_linux${arch}_${today} gedit ${install}/HISTORY.txt gedit /dls_sw/apps/Modules/modulefiles/eclipse/<whatever>