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

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

NatTable dependencies

NatTable requires a few plugin dependencies that are not part of a standard Eclipse install. There are two different ways to bring these dependencies in, depending on what version of Eclipse you are using:

Setting the target platform (for Eclipse version 3.5)

  • Open the nattable.target file in the net.sourceforge.nattable.core project
  • Click on the 'Set as Target Platform' link in the upper-right corner.

All of the projects should now compile cleanly.

Importing plugin dependencies into Eclipse (for Eclipse version < 3.5)

We have a small maven script that can fetch these dependencies for you:

cd NATTABLE_TRUNK/deps
mvn clean package

The plugin dependencies will be downloaded and installed into NATTABLE_TRUNK/deps/target/dependency

Now import those dependencies into Eclipse:

  • select File -> Import from the menubar
  • choose Plug-in Development -> Plug-ins and Fragments
  • click Next
  • Specify the directory to import plugins from: (NATTABLE_TRUNK/nattable/target/dependency)
  • click Next
  • click Add All
  • click Finish

At this point all of the projects should 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.