org.eclipse.xtext.ui.search
Class EObjectDescriptionContentProvider

java.lang.Object
  extended by org.eclipse.xtext.ui.search.EObjectDescriptionContentProvider
All Implemented Interfaces:
org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.viewers.ILazyContentProvider

public class EObjectDescriptionContentProvider
extends java.lang.Object
implements org.eclipse.jface.viewers.ILazyContentProvider

Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
EObjectDescriptionContentProvider()
           
 
Method Summary
 void dispose()
          Disposes of this content provider.
 void inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
          Notifies this content provider that the given viewer's input has been switched to a different element.
 void updateElement(int index)
          Called when a previously-blank item becomes visible in the TableViewer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EObjectDescriptionContentProvider

public EObjectDescriptionContentProvider()
Method Detail

dispose

public void dispose()
Description copied from interface: org.eclipse.jface.viewers.IContentProvider
Disposes of this content provider. This is called by the viewer when it is disposed.

The viewer should not be updated during this call, as it is in the process of being disposed.

Specified by:
dispose in interface org.eclipse.jface.viewers.IContentProvider

inputChanged

public void inputChanged(org.eclipse.jface.viewers.Viewer viewer,
                         java.lang.Object oldInput,
                         java.lang.Object newInput)
Description copied from interface: org.eclipse.jface.viewers.IContentProvider
Notifies this content provider that the given viewer's input has been switched to a different element.

A typical use for this method is registering the content provider as a listener to changes on the new input (using model-specific means), and deregistering the viewer from the old input. In response to these change notifications, the content provider should update the viewer (see the add, remove, update and refresh methods on the viewers).

The viewer should not be updated during this call, as it might be in the process of being disposed.

Specified by:
inputChanged in interface org.eclipse.jface.viewers.IContentProvider
Parameters:
viewer - the viewer
oldInput - the old input element, or null if the viewer did not previously have an input
newInput - the new input element, or null if the viewer does not have an input

updateElement

public void updateElement(int index)
Description copied from interface: org.eclipse.jface.viewers.ILazyContentProvider
Called when a previously-blank item becomes visible in the TableViewer. If the content provider knows the element at this row, it should respond by calling TableViewer#replace(Object, int). NOTE #updateElement(int index) can be used to determine selection values. TableViewer#replace(Object, int) is not called before returning from this method selections may have missing or stale elements. In this situation it is suggested that the selection is asked for again after he update.

Specified by:
updateElement in interface org.eclipse.jface.viewers.ILazyContentProvider
Parameters:
index - The index that is being updated in the table.