Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Lazy Virtual Tables and Views
Lazy Virtual Tables and Views [message #330335] Fri, 25 July 2008 16:22
David Furstein is currently offline David FursteinFriend
Messages: 1
Registered: July 2009
Junior Member
I recently implemented a virtual table (within a table viewer) using the
ILazyContentProvider. When the program comes up, and the view containing
the table is active, the table is populated without any issues. However,
if I were to close the view and bring the view back up, the table does not
retain any of its data. If I bring up the program and the view is not
active, the same behavior occurs where no data is ever displayed.

Has anyone ran into a similar issue?

I have included an abridged version of the content provider I am using.
Any help would be greatly appreciated.

public class InventoryContentProvider
implements ILazyContentProvider, InventoryListener
{
private TableViewer m_tableViewer;

public void inputChanged(Viewer viewer, Object oldInput, Object
newInput)
{
if (oldInput != newInput && oldInput != null)
((InventoryManager)oldInput).removeInventoryListener(this);

if (newInput != oldInput && newInput != null)
((InventoryManager)newInput).addInventoryListener(this);

m_tableViewer = (TableViewer) viewer;
m_tableViewer.getTable().clearAll();
}

public void dispose() {}

@Override
public void updateElement(int index)
{
if (m_tableViewer.getContentProvider() != null) {
m_tableViewer.replace(m_tableViewer.getElementAt(index),
index);
}
}
}
Previous Topic:Any guidelines for plugins that require a long startup?
Next Topic:Build problem with plugins. (help needed)
Goto Forum:
  


Current Time: Fri Dec 27 02:47:22 GMT 2024

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

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

Back to the top