Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Eclipse plugin(Create table Error)
Eclipse plugin [message #1049992] Fri, 26 April 2013 14:57 Go to next message
Nick Sira is currently offline Nick SiraFriend
Messages: 3
Registered: April 2013
Junior Member
Hi everybody!
I'm trying to write eclipse plugin. In the latest version my project i used SWT/JFace table but now i need use NatTable.Well..
I've got this error
An error has occurred. See error log for more details.
org/eclipse/nebula/widgets/nattable/data/IDataProvider

I am just trying to execute this code

IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();

Shell shell = new Shell(Display.getCurrent());
shell.setLayout(new FillLayout());
shell.setSize(800, 400);
shell.setText("NatTable1");

new CreateNatTable(shell);
shell.open();
while (!shell.isDisposed()) {
if (!Display.getCurrent().readAndDispatch()) {
Display.getCurrent().sleep();
}
}
shell.dispose();
Display.getCurrent().dispose();
Re: Eclipse plugin [message #1049999 is a reply to message #1049992] Fri, 26 April 2013 15:01 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2751
Registered: July 2012
Senior Member
Well how should I help you without seeing the error?

First of all, try to look at the log and look if you can find out what is wrong.
Second, pointing to the IDataProvider it seems there is an error on getting data.
Third, what is CreateNatTable()?
Re: Eclipse plugin [message #1050018 is a reply to message #1049999] Fri, 26 April 2013 15:27 Go to previous messageGo to next message
Nick Sira is currently offline Nick SiraFriend
Messages: 3
Registered: April 2013
Junior Member
Thanks for answering
..well CreateNatTable it is simple class with this constructor
public class CreateNatTable {
public static final String ID = "com.project.CreateNatTable";
private Composite parent = null;
private NatTable natTable = null;

public CreateNatTable(Composite parent) {
this.parent = parent;

DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(2, 10);
SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(bodyDataProvider));
DataLayer colDataLayer = new DataLayer(new DummyColumnHeaderDataProvider(bodyDataProvider));
ILayer columnHeaderLayer = new ColumnHeaderLayer(colDataLayer, selectionLayer, selectionLayer);

CompositeLayer compositeLayer = new CompositeLayer(1, 2);
compositeLayer.setChildLayer(GridRegion.COLUMN_HEADER, columnHeaderLayer, 0, 0);
compositeLayer.setChildLayer(GridRegion.BODY, selectionLayer, 0, 1);

natTable = new NatTable(this.parent, compositeLayer, false);

}
Oh i see..this method SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(bodyDataProvider)); trying to get datas and crushing.
I just want to run simple example without any datas on columns and raws.
Re: Eclipse plugin [message #1050033 is a reply to message #1050018] Fri, 26 April 2013 15:49 Go to previous messageGo to next message
Nick Sira is currently offline Nick SiraFriend
Messages: 3
Registered: April 2013
Junior Member
and this is log error

!ENTRY org.eclipse.jface 4 2 2013-04-26 19:48:33.991
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/nebula/widgets/nattable/data/IDataProvider
at com.samsung.swap.gui.managers.AnalyticsManager.createEditors(AnalyticsManager.java:262)
at com.samsung.swap.gui.managers.AnalyticsManager.runAnalytics(AnalyticsManager.java:186)
at com.samsung.swap.gui.views.WorkspaceView$4.doubleClick(WorkspaceView.java:319)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)
at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1477)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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)
Caused by: java.lang.ClassNotFoundException: org.eclipse.nebula.widgets.nattable.data.IDataProvider
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 39 more
Re: Eclipse plugin [message #1050045 is a reply to message #1050033] Fri, 26 April 2013 16:06 Go to previous message
Edwin Park is currently offline Edwin ParkFriend
Messages: 124
Registered: July 2009
Senior Member
This is a classpath issue. Make sure that your bundle manifests have the right dependencies in them. I'm guessing you forgot to add the nattable dependencies somewhere.

Cheers,
Edwin
Previous Topic:Issue with RowSelectionProvider
Next Topic:Freeze question
Goto Forum:
  


Current Time: Thu Dec 05 17:34:38 GMT 2019

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

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

Back to the top