Help searched for NatTable evolution by Dirk Fauth

Currently we are working a lot on the NatTable core to make it a more robust and flexible framework. This comes with some major refactorings that enhance existing interfaces or change workflows. The last few days (or weeks) we worked on a major refactoring regarding the edit behaviour in NatTable. The main goal was to cleanup the API, fix some special bugs and make it easier to create new editors for the NatTable. I also added the possibility to create cell editors that open in a dialog. Even wrapping SWT or JFace dialogs is now possible for a NatTable cell editor. You can find a (hopefully) complete list about the changes in the forum.

As you know, such changes need to be tested well. We have a lot of automatic testcases and I created a new example EditorExample showing all cell editors with their different configuration possibilities to test manually. Although as the developer of the refactoring, I am not sure if I tested every case. This is why I am trying to request some help for testing here, so we can be sure that the upcoming 1.0.0 release of the NatTable doesn’t come with serious errors.

If you are interested in helping us on testing the NatTable, a good starting point is to checkout the sources and run the examples from the source code. How to checkout the sources and setup your workspace is described here. Any help will be appreciated. Note that we are working on a p2 Update Site but there are still some issues with third-party-libraries that need to be solved with the help of the Orbit team.

We would also like to know if there are interested parties for a NatTable that supports JavaFX. Feel free to comment on this blog post so we can get a feeling about the future goals of the NatTable.

About Dirk Fauth

Dirk Fauth is a Software Architect for Rich Client Systems working for the Robert Bosch GmbH in Stuttgart and a lecturer in Java basics for the Baden-Wuerttemberg Cooperative State University (DHBW). He is active in developing, teaching and talking about OSGi, Eclipse RCP applications and Eclipse related technologies. He is project lead of the Nebula NatTable project, Eclipse Platform committer and also a committer and contributor to several other Eclipse projects. (Twitter: @fipro78)
This entry was posted in Dirk Fauth, Eclipse. Bookmark the permalink.

18 Responses to Help searched for NatTable evolution by Dirk Fauth

  1. I checked the sample provided on the NatTable project homepage with UI accessibility checker and the result is really bad : the table content is totally hidden to assistive technologies !

    Any new UI component must inherit from a default one or implements some accessibility interface in order to be shown to assistive technologies.

    Please check http://wiki.eclipse.org/Accessibility for support on how to manage accessibility in custom controls like Nebula ones.

  2. Dirk Fauth says:

    Thanks for the information and the check. I think nobody requested that support in the past, therefore nobody looked after it. I created a ticket in bugzilla referencing your comment. Hopefully we will have soon the time to implement this.

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=399477

  3. It looks like the getting started page is out of date since last Wednesday.
    Apparently the command ‘mvn -f deps/pom.xml clean install’ is no longer necessary.
    Also I am getting a NoClassDefFoundError on HSSFExcelExporter with some of the examples, but everything else looks pretty good!
    Great to hear about the progress you are making, and that you are considering JavaFX support as well.
    Is there a roadmap for the 1.0.0 release?

  4. Dirk Fauth says:

    Hi and thanks for pointing to the missing update of the documentation. Yes the mentioned command isn’t necessary anymore. It was used to create some local OSGi version of Apache POI. Since it is now available in Orbit, we were able to remove the local JAR dependency and use the p2 dependency in the target definition instead. I will update the documentation.
    The NoClassDefFoundError might be caused by this change too. Have you checked out the sources before? You might be able to avoid those errors by refreshing and resetting the NatTable target definition as it has changed. If this doesn’t solve it, please give me a hint where you find these errors so we can fix this.
    Currently we don’t have a strict roadmap. We use Bugzilla for every change we are making, so the following URL should point you to the things that will be included: https://bugs.eclipse.org/bugs/buglist.cgi?list_id=4297837&classification=Technology&query_format=advanced&product=NatTable&target_milestone=1.0.0
    We are still working on some stuff like an enhancement of the viewport and some other business requests. We planned to release in January, but unfortunately we still have some work to finish and we hope that GlazedLists 1.9 will be released and added to Orbit soon, so we will be able to change our dependency management and build process to remove local JAR dependencies completely before releasing NatTable 1.0.0.

  5. Hi Dirk,
    I did a new clone and build today, but the NoClassDefFoundError remains. It always occurs, for example when I double-click the “Column and row grouping” -> “Column groups” or the “Persistence”->”Column groups (Persisted)” example.
    However, a file with the name HSSFExcelExporter.class is in my file system:
    org.eclipse.nebula.widgets.nattable\org.eclipse.nebula.widgets.nattable.extension.poi\target\classes\org\eclipse\nebula\widgets\nattable\extension\poi
    Below you’ll find the strack trace.
    Hope that helps!

    Exception occurred
    java.lang.NoClassDefFoundError: org/eclipse/nebula/widgets/nattable/extension/poi/HSSFExcelExporter
    at org.eclipse.nebula.widgets.nattable.examples.examples._150_Column_and_row_grouping._000_Column_groups$2.configureRegistry(_000_Column_groups.java:148)
    at org.eclipse.nebula.widgets.nattable.NatTable.configure(NatTable.java:420)
    at org.eclipse.nebula.widgets.nattable.examples.examples._150_Column_and_row_grouping._000_Column_groups.createExampleControl(_000_Column_groups.java:167)
    at org.eclipse.nebula.widgets.nattable.examples.runner.TabbedNatExampleRunner.openExampleInTab(TabbedNatExampleRunner.java:170)
    at org.eclipse.nebula.widgets.nattable.examples.runner.TabbedNatExampleRunner.access$0(TabbedNatExampleRunner.java:140)
    at org.eclipse.nebula.widgets.nattable.examples.runner.TabbedNatExampleRunner$1.doubleClick(TabbedNatExampleRunner.java:79)
    at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:821)
    at org.eclipse.jface.util.SafeRunnable$1.run(SafeRunnable.java:128)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:819)
    at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1419)
    at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1195)
    at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:238)
    at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:235)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:296)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
    at org.eclipse.nebula.widgets.nattable.examples.runner.TabbedNatExampleRunner.run(TabbedNatExampleRunner.java:91)
    at org.eclipse.nebula.widgets.nattable.examples.runner.TabbedNatExampleRunner.run(TabbedNatExampleRunner.java:54)
    at org.eclipse.nebula.widgets.nattable.examples.NatTableExamples.main(NatTableExamples.java:55)
    Caused by: java.lang.ClassNotFoundException: org.eclipse.nebula.widgets.nattable.extension.poi.HSSFExcelExporter
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    … 22 more

  6. Dirk Fauth says:

    Thanks! It seems the Apache POI dependency is not on your classpath. Need to think about this. Should be related to the build.

  7. This is how I start the examples:
    $ java.exe -cp “org.eclipse.swt.win32.win32.x86_3.6.1.v3655c.jar;NatTableExamples-0.9.0.jar” org.eclipse.nebula.widgets.nattable.examples.NatTableExamples

  8. Dirk Fauth says:

    Is this just a copy&paste issue or do you really start the 0.9.0 version? Because if you cloned the current master and build it, you should have a 1.0.0-SNAPSHOT

  9. Can you provide instructions for building a JAR for NatTableExamples?
    I used the one I found on the download page, which was linked on the getting started page [1], but of course I’d rather use the current one. πŸ™‚

    [1] http://eclipse.org/nattable/download.php

  10. Dirk Fauth says:

    I always run the examples out of Eclipse. πŸ˜‰ And I didn’t create the examples plugin. We need to automize this too. πŸ˜‰
    I think you need to right click on “Build Examples JAR.launch” in the org.eclipse.nebula.widgets.nattable.examples and run it as an ant task. I need to talk to Edwin if this doesn’t help you.

  11. I imported the project in Eclipse and tried to copy the missing dependencies, but it does not create the “dependencies”-directory expected by the target-files. I tried the m2e launch configuration as well as ‘mvn dependency:copy-dependencies -DoutputDirectory=dependencies’ from within the directory ‘target-platform’.
    The result is ‘build success’, but no directory is created, which means the target-platform is incomplete and I can’t compile the examples-project.
    Do you have an idea what went wrong?

  12. Alright, I got it to compile and run, and your Excel-export looks pretty good too!
    The current build requires quite a bit of manual work, though.
    I had to download GlazedLists [2] and import it as a Plug-In into my workspace manually, but I suppose this problem should disappear as soon as GlazedLists is in the Orbit.
    Additionally, I had to add two Plug-Ins to the classpath manually.
    I think the problem is the current Ant-task ‘create_run_jar’ does not include those in the final NatTableExamples.jar.

    This is how I start the NatTableExamples:
    $ java.exe -cp “org.eclipse.swt.win32.win32.x86_3.6.1.v3655c.jar;NatTableExamples.jar;org.eclipse.nebula.widgets.nattable.extension.poi.jar;org.apache.poi_3.7.0.v201301211856.jar” org.eclipse.nebula.widgets.nattable.examples.NatTableExamples

    [2] http://java.net/downloads/glazedlists/glazedlists-1.8.0/

  13. Dirk Fauth says:

    Hi and thanks a lot for your time in investigating on this. Indeed GlazedLists need to be downloaded as it isn’t available in a p2 update site. Usually this should be solved by the copy-dependencies tasks we provide. We need to look why it doesn’t work correctly. And yes those jars should be included to the NatTableExamples IMHO. The only dependency we can’t provide is the platform dependent SWT jar. We will have a look on how to fix this.

  14. I am currently evaluating NatTable for a future project, so having a fully functional example of the current development state was in my own interest, but I am glad it helps you as well. πŸ™‚
    IMHO, a good way to make the examples more accessible would be to deploy them in form of a small Eclipse RCP application. With Tycho it wouldn’t be too hard to create an executable file (for all major platforms) that contains all required libraries, including SWT.

  15. Dirk Fauth says:

    Yes that’s true. And we use Tycho since several years. πŸ™‚ I think the examples app is what it is because we integrate it to our website so it can be launched directly without having the need to download it first. And of course it was intended to be a plain SWT control in first place, without any Eclipse specific dependencies. Also we were more focused on the NatTable itself, so the examples app lost a bit love. πŸ˜‰ We definitely should consider building something new on top of the existing examples for the future.

  16. Edwin Park says:

    Hi Max,

    Dirk pointed me to this conversation. I think the RCP example app is a good idea. I’ll look into fixing up our examples based on feedback from here shortly.

    Thanks,
    Edwin

  17. Daya says:

    Hi,

    I’ve a JavaFX application and keen to understand if this table can be added as component into JavaFX canvas or JFXPanel. Appreciate your help on this

  18. Dirk Fauth says:

    AFAIK it is not possible to add SWT widgets to a JavaFX application. So currently it seems to be not possible to add NatTable to a JavaFX application. But we are working on some refactoring of the NatTable to make it possible to use the NatTable with various UI toolkits. Unfortunately because of a lack of time we can not give any time prediction on when it will be finished. But we are still searching sponsors to buy us some time from our bosses. πŸ˜‰

Comments are closed.