You can also download the source code and contribute it to NatTable. The following information will help you set up
your development environment. The development tools with minimum versions that are used by the NatTable team are listed below.
- JDK 1.6
- Eclipse 3.5
- Maven 3 with Tycho
- Git
After all of these tools are installed you can download the NatTable sources via Git with the following command:
git clone git://git.eclipse.org/gitroot/nattable/org.eclipse.nebula.widgets.nattable.git
Note: we will refer to the location where you checked out the NatTable trunk code as NATTABLE_TRUNK
To build from the command line, you need to execute the following command from the NATTABLE_TRUNK/nattable directory:
mvn -f org.eclipse.nebula.widgets.nattable.parent/pom.xml clean install
If you are working on a codebase prior 1.0.0 you will need to execute the following command before you are
trying to build NatTable the first time. It is needed to wrap non-OSGi jar dependencies (Apache Poi) as OSGi bundles.
mvn -f deps/pom.xml clean install
Importing projects into Eclipse
The first thing you will need to do is import the NatTable projects into Eclipse:
- select File -> Import from the menubar
- choose General -> Existing Projects into Workspace
- click Next
- Select root directory: (NATTABLE_TRUNK/nattable)
- click Finish
Setting the target platform
- Copy 3rd party dependencies:
- Open the nattable.target file in the target-platform project
- Click on the 'Set as Target Platform' link in the upper-right corner.
All of the projects should now compile cleanly.
Code formatting
Please use the Eclipse formatter profile in org.eclipse.nebula.widgets.nattable/dev_config/NatTable_style.xml.
Import this and set as the active profile in Eclipse in the Java -> Code Style -> Formatter preferences page.
Source code organization
NatTable source is divided into the following projects:
- org.eclipse.nebula.widgets.nattable.core - Core NatTable code
- org.eclipse.nebula.widgets.nattable.extension.glazedlists - NatTable extensions for GlazedLists
- org.eclipse.nebula.widgets.nattable.extension.poi - NatTable extensions for Apache POI
- org.eclipse.nebula.widgets.examples - example programs
In addition there are also various test projects. All of these projects are packaged as Eclipse plugins/OSGi bundles.
Code conventions
Interfaces are prefixed with 'I', e.g. INatTableModel