public class AdapterFactoryContentProvider extends java.lang.Object implements INotifyChangedListener
org.eclipse.jface.viewers.IStructuredContentProvider
is delegated to
IStructuredItemContentProvider
; ITreeContentProvider
is delegated
to ITreeItemContentProvider
;
and IPropertySourceProvider
to IItemPropertySource
.Modifier and Type | Class and Description |
---|---|
static class |
AdapterFactoryContentProvider.ViewerRefresh
A runnable class that efficiently updates a
org.eclipse.jface.viewers.Viewer via standard APIs, based on
queued IViewerNotification s from the model's item providers. |
Modifier and Type | Field and Description |
---|---|
protected AdapterFactory |
adapterFactory
This keeps track of the one factory we are using.
|
protected Viewer |
viewer
This keeps track of the one viewer using this content provider.
|
protected AdapterFactoryContentProvider.ViewerRefresh |
viewerRefresh
This is used to queue viewer notifications and refresh viewers based on them.
|
Constructor and Description |
---|
AdapterFactoryContentProvider(AdapterFactory adapterFactory)
This constructs an instance that wraps this factory.
|
Modifier and Type | Method and Description |
---|---|
protected IPropertySource |
createPropertySource(java.lang.Object object,
IItemPropertySource itemPropertySource) |
void |
dispose()
This discards the content provider and removes this as a listener to the
adapterFactory . |
AdapterFactory |
getAdapterFactory()
This returns the wrapped factory.
|
java.lang.Object[] |
getChildren(java.lang.Object object)
This implements
org.eclipse.jface.viewers.ITreeContentProvider .getChildren to forward the call to an object that implements
ITreeItemContentProvider.getChildren . |
java.lang.Object[] |
getElements(java.lang.Object object)
This implements
org.eclipse.jface.viewers.IStructuredContentProvider .getElements to
forward the call to an object that implements
IStructuredItemContentProvider.getElements . |
java.lang.Object |
getParent(java.lang.Object object)
This implements
org.eclipse.jface.viewers.ITreeContentProvider .getParent to forward the call to an object that implements
ITreeItemContentProvider.getParent . |
IPropertySource |
getPropertySource(java.lang.Object object)
This implements
org.eclipse.ui.views.properties.IPropertySourceProvider .getPropertySource to forward the call to an object that implements
IItemPropertySource . |
boolean |
hasChildren(java.lang.Object object)
This implements
org.eclipse.jface.viewers.ITreeContentProvider .hasChildren to forward the call to an object that implements
ITreeItemContentProvider.hasChildren . |
void |
inputChanged(Viewer viewer,
java.lang.Object oldInput,
java.lang.Object newInput)
The given Viewer will start (oldInput == null) or stop (newInput == null) listening for domain events.
|
void |
notifyChanged(Notification notification) |
void |
setAdapterFactory(AdapterFactory adapterFactory)
This sets the wrapped factory.
|
protected AdapterFactory adapterFactory
ComposedAdapterFactory
if adapters
from more the one factory are involved in the model.protected Viewer viewer
protected AdapterFactoryContentProvider.ViewerRefresh viewerRefresh
public AdapterFactoryContentProvider(AdapterFactory adapterFactory)
IChangeNotifier
,
a listener is added to it,
so it's important to call dispose()
.public void setAdapterFactory(AdapterFactory adapterFactory)
IChangeNotifier
,
a listener is added to it,
so it's important to call dispose()
.public AdapterFactory getAdapterFactory()
public void inputChanged(Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
public java.lang.Object[] getElements(java.lang.Object object)
org.eclipse.jface.viewers.IStructuredContentProvider
.getElements to
forward the call to an object that implements
IStructuredItemContentProvider.getElements
.public java.lang.Object[] getChildren(java.lang.Object object)
org.eclipse.jface.viewers.ITreeContentProvider
.getChildren to forward the call to an object that implements
ITreeItemContentProvider.getChildren
.public boolean hasChildren(java.lang.Object object)
org.eclipse.jface.viewers.ITreeContentProvider
.hasChildren to forward the call to an object that implements
ITreeItemContentProvider.hasChildren
.public java.lang.Object getParent(java.lang.Object object)
org.eclipse.jface.viewers.ITreeContentProvider
.getParent to forward the call to an object that implements
ITreeItemContentProvider.getParent
.public void dispose()
adapterFactory
.public IPropertySource getPropertySource(java.lang.Object object)
org.eclipse.ui.views.properties.IPropertySourceProvider
.getPropertySource to forward the call to an object that implements
IItemPropertySource
.protected IPropertySource createPropertySource(java.lang.Object object, IItemPropertySource itemPropertySource)
public void notifyChanged(Notification notification)
notifyChanged
in interface INotifyChangedListener