Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Nattable in a eclipse Plugin
Nattable in a eclipse Plugin [message #1042746] Tue, 16 April 2013 20:36 Go to next message
Testr t is currently offline Testr tFriend
Messages: 93
Registered: April 2013
Member
Hi,

I am trying to create an eclipse plugin with a powerful grid. Is it possible to use the Nattable grid in an eclipse plugin view? Are there any documentation pointing to this?
Re: Nattable in a eclipse Plugin [message #1044137 is a reply to message #1042746] Thu, 18 April 2013 14:33 Go to previous messageGo to next message
Patrick Rusk is currently offline Patrick RuskFriend
Messages: 35
Registered: June 2012
Member
Definitely. The main thing you need to do is have the NatTable OSGI bundles available and marked as dependencies of your plugin. Then, use it in your plugin as you would any other SWT widgets.
Re: Nattable in a eclipse Plugin [message #1044138 is a reply to message #1042746] Thu, 18 April 2013 14:34 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
NatTable is a SWT widget. So yes of course you can use it in an eclipse view/editor/part ...

Well the documentation pointing out on how directly to do this is not yet finished. In fact you need to install NatTable to your target-platform (use the p2 SNAPSHOT update sites as we soon will release the final 1.0.0). Then add the necessary dependencies to your plugin-project and then start using NatTable as described in the documentation so far.

http://eclipse.org/nattable/documentation.php

Or what is your concrete question about this?

Re: Nattable in a eclipse Plugin [message #1044152 is a reply to message #1044138] Thu, 18 April 2013 14:53 Go to previous messageGo to next message
Testr t is currently offline Testr tFriend
Messages: 93
Registered: April 2013
Member
Thanks Dirk. I was looking for an update site but ended up adding the 0.9.0 jar file as referenced libraries in my plugin and it seems to work. Do you have any release data for the update site for 1.0 library?
Re: Nattable in a eclipse Plugin [message #1044262 is a reply to message #1044152] Thu, 18 April 2013 17:28 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
We are planning to release the next weeks. Here you find the update sites for the snapshots http://download.eclipse.org/nattable/snapshots/
Re: Nattable in a eclipse Plugin [message #1044341 is a reply to message #1044262] Thu, 18 April 2013 19:52 Go to previous messageGo to next message
Testr t is currently offline Testr tFriend
Messages: 93
Registered: April 2013
Member
Thanks Dirk. I will wait for the 1.x to use the update site. I am using the grid in a plugin and it works(able to see the grid in plugin view). But when I select the rows I get this error

java.lang.NoClassDefFoundError: org/apache/commons/lang/builder/HashCodeBuilder
at org.eclipse.nebula.widgets.nattable.coordinate.Range.hashCode(Range.java:79)
at java.util.HashMap.hash(Unknown Source)
at java.util.HashMap.put(Unknown Source)
at java.util.HashSet.add(Unknown Source)
at org.eclipse.nebula.widgets.nattable.selection.SelectionModel.getSelectedRowPositions(SelectionModel.java:357)
at org.eclipse.nebula.widgets.nattable.selection.SelectionModel.isRowPositionSelected(SelectionModel.java:391)
at org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.isRowPositionSelected(SelectionLayer.java:334)
at org.eclipse.nebula.widgets.nattable.grid.layer.RowHeaderLayer.getDisplayModeByPosition(RowHeaderLayer.java:82)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.getDisplayModeByPosition(CompositeLayer.java:532)
at org.eclipse.nebula.widgets.nattable.layer.cell.AbstractLayerCell.getDisplayMode(AbstractLayerCell.java:38)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.getCellPainter(AbstractLayer.java:302)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.getCellPainter(CompositeLayer.java:577)
at org.eclipse.nebula.widgets.nattable.painter.layer.CellLayerPainter.paintCell(CellLayerPainter.java:66)
at org.eclipse.nebula.widgets.nattable.painter.layer.CellLayerPainter.paintLayer(CellLayerPainter.java:41)
at org.eclipse.nebula.widgets.nattable.painter.layer.GridLineCellLayerPainter.paintLayer(GridLineCellLayerPainter.java:41)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer$CompositeLayerPainter.paintLayer(CompositeLayer.java:916)
at org.eclipse.nebula.widgets.nattable.painter.layer.NatLayerPainter.paintLayer(NatLayerPainter.java:36)
at org.eclipse.nebula.widgets.nattable.NatTable.paintNatTable(NatTable.java:333)
at org.eclipse.nebula.widgets.nattable.NatTable.paintControl(NatTable.java:329)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:230)
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.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1463)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4585)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:334)
at org.eclipse.jface.dialogs.MessageDialogWithToggle.open(MessageDialogWithToggle.java:114)
at org.eclipse.jface.dialogs.MessageDialogWithToggle.openOkCancelConfirm(MessageDialogWithToggle.java:209)
at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.promptOnExit(IDEWorkbenchWindowAdvisor.java:218)
at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.preWindowShellClose(IDEWorkbenchWindowAdvisor.java:171)
at org.eclipse.ui.internal.WorkbenchWindow$6.close(WorkbenchWindow.java:445)
at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$11.shellClosed(WBWRenderer.java:580)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98)
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.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:309)
at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1694)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4530)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3129)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3753)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
I downloaded the 2.4 version of commons-lang-2.4.jar and referenced in my plugin but still it shows this error. Any other dependencies I am missing?
Re: Nattable in a eclipse Plugin [message #1044642 is a reply to message #1044341] Fri, 19 April 2013 06:52 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Quote:
I will wait for the 1.x to use the update site.


Well if you just start using NatTable, I recommend using the SNAPSHOT update sites now. We are working hard on finishing the release. And there are API changes coming with 1.0.0. But that'S your choice.

The dependencies are

org.apache.commons.codec
org.apache.commons.lang
org.apache.commons.logging

Have you ensured that they are also included in your product configuration?
Previous Topic:Bug PaddingDecorator?
Next Topic:"Friends of NatTable"
Goto Forum:
  


Current Time: Thu Mar 28 18:25:09 GMT 2024

Powered by FUDForum. Page generated in 0.10825 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top