Eclipse plugin [message #1049992] |
Fri, 26 April 2013 10:57  |
Eclipse User |
|
|
|
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 #1050018 is a reply to message #1049999] |
Fri, 26 April 2013 11:27   |
Eclipse User |
|
|
|
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 #1050045 is a reply to message #1050033] |
Fri, 26 April 2013 12:06  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03958 seconds