Developer Notes

Development tools

We use the following tools for NatTable development:

Development environment setup - step by step

Download and install the development tools listed above.

Checking out the code and building from the command line

You should check out the code outside of Eclipse so you can preserve the hierarchical directory structure. Use the following command to check out the trunk code:

svn checkout https://nattable.svn.sourceforge.net/svnroot/nattable/trunk

Note: we will refer to the location where you checked out the NatTable trunk code as NATTABLE_TRUNK

To build from the command line, execute the following command from in the net.sourceforge.nattable.parent directory:

mvn 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:
    • If you have m2eclipse installed, you can right-click on the Copy dependencies.launch file in the target-platform project and select 'Run As->Copy dependencies'
    • Otherwise, you can run mvn -N dependency:copy-dependencies from the command line from within in the target-platform project directory
  • 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.

Additional Eclipse setup/tips

Code formatting

Please use the Eclipse formatter profile in net.sourceforge.nattable/dev_config/NatTable_style.xml. Import this and set as the active profile in Eclipse in the Java -> Code Style -> Formatter preferences page.

Setting up Mylyn

Here's how to set up mylyn to connect to the Jira bug tracker. The URL for the NatTable Jira is: http://nattable.org/jira

Source code organization

NatTable source is divided into the following projects:

  • net.sourceforge.nattable.core - Core NatTable code
  • net.sourceforge.nattable.extension.glazedlists - NatTable extensions for working with GlazedLists
  • net.sourceforge.nattable.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

Comments

Target project mistake

"
Open the nattable.target file in the net.sourceforge.nattable.core project
"

This is incorrect. The file that needs to be opened is under the target-platform project.