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.

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);

new CreateNatTable(shell);;
while (!shell.isDisposed()) {
if (!Display.getCurrent().readAndDispatch()) {
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: 2824
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".
java.lang.NoClassDefFoundError: org/eclipse/nebula/widgets/nattable/data/IDataProvider
at org.eclipse.jface.viewers.StructuredViewer$
at org.eclipse.ui.internal.JFaceUtil$
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(
at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(
at org.eclipse.jface.util.OpenStrategy.access$0(
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(
at org.eclipse.swt.widgets.EventTable.sendEvent(
at org.eclipse.swt.widgets.Widget.sendEvent(
at org.eclipse.swt.widgets.Display.runDeferredEvents(
at org.eclipse.swt.widgets.Display.readAndDispatch(
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
at org.eclipse.core.databinding.observable.Realm.runWithDefault(
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
at org.eclipse.ui.internal.Workbench$
at org.eclipse.core.databinding.observable.Realm.runWithDefault(
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
at org.eclipse.ui.internal.ide.application.IDEApplication.start(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.eclipse.equinox.launcher.Main.invokeFramework(
at org.eclipse.equinox.launcher.Main.basicRun(
at org.eclipse.equinox.launcher.Main.main(
Caused by: java.lang.ClassNotFoundException:
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
... 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.

Previous Topic:Issue with RowSelectionProvider
Next Topic:Freeze question
Goto Forum:

Current Time: Mon Sep 27 08:06:34 GMT 2021

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

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

Back to the top