org.eclipse.emf.cdo.ui
Class CDOItemProvider

java.lang.Object
  extended by org.eclipse.net4j.util.ui.StructuredContentProvider<INPUT>
      extended by org.eclipse.net4j.util.ui.views.ItemProvider<CONTAINER>
          extended by org.eclipse.net4j.util.ui.views.ContainerItemProvider<IContainer<Object>>
              extended by org.eclipse.emf.cdo.ui.CDOItemProvider
All Implemented Interfaces:
EventListener, IBaseLabelProvider, IColorProvider, IContentProvider, IFontProvider, ILabelProvider, IStructuredContentProvider, ITreeContentProvider, IListener

public class CDOItemProvider
extends ContainerItemProvider<IContainer<Object>>

Implements multiple functionality related with UI representation of basic CDO concepts on TreeViewer-based editors and views.

For instance, behaves as content and label provider for concepts such as CDOSession, CDOView, CDOResource and CDOResourceFolder. It also providers common context menu action over those elements.

See Also:
IContentProvider, ILabelProvider

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.net4j.util.ui.views.ContainerItemProvider
ContainerItemProvider.AbstractContainerNode, ContainerItemProvider.AbstractNode, ContainerItemProvider.ContainerNode, ContainerItemProvider.ErrorElement, ContainerItemProvider.LazyElement, ContainerItemProvider.LeafNode, ContainerItemProvider.Node
 
Field Summary
 
Fields inherited from class org.eclipse.net4j.util.ui.views.ItemProvider
NO_ELEMENTS
 
Constructor Summary
CDOItemProvider(IWorkbenchPage page)
           
CDOItemProvider(IWorkbenchPage page, IElementFilter rootElementFilter)
           
 
Method Summary
protected  void connectInput(IContainer<Object> input)
           
protected  void disconnectInput(IContainer<Object> input)
           
protected  void elementAdded(Object element, Object parent)
           
protected  void fillContextMenu(IMenuManager manager, ITreeSelection selection)
           
protected  boolean fillGenerated(MenuManager manager, CDOSession session)
           
protected  void fillResource(IMenuManager manager, CDOResource resource)
           
protected  void fillResourceFolder(IMenuManager manager, CDOResourceFolder folder)
           
protected  void fillSession(IMenuManager manager, CDOSession session)
           
protected  void fillView(IMenuManager manager, CDOView view)
           
 Object[] getChildren(Object element)
           
 Font getFont(Object obj)
           
 Image getImage(Object obj)
           
 Object getParent(Object element)
           
 String getText(Object obj)
           
static Image getViewImage(CDOView view)
           
static ImageDescriptor getViewImageDescriptor(CDOView view)
           
 boolean hasChildren(Object element)
           
 
Methods inherited from class org.eclipse.net4j.util.ui.views.ContainerItemProvider
addNode, createContaineNode, createLeafNode, createNode, dispose, elementRemoved, executeRunnable, filterRootElement, getErrorText, getForeground, getNode, getNodes, getRoot, getRootElementFilter, getSlowText, handleInactiveElement, isSlow, removeNode
 
Methods inherited from class org.eclipse.net4j.util.ui.views.ItemProvider
addListener, fireLabelProviderChanged, fireLabelProviderChanged, fireLabelProviderChanged, getBackground, getElements, getListeners, isLabelProperty, removeListener
 
Methods inherited from class org.eclipse.net4j.util.ui.StructuredContentProvider
getDisplay, getInput, getItalicFont, getViewer, inputChanged, notifyEvent, refreshElement, refreshSynced, refreshViewer, revealElement, selectElement, updateLabels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.viewers.IContentProvider
inputChanged
 

Constructor Detail

CDOItemProvider

public CDOItemProvider(IWorkbenchPage page,
                       IElementFilter rootElementFilter)

CDOItemProvider

public CDOItemProvider(IWorkbenchPage page)
Method Detail

connectInput

protected void connectInput(IContainer<Object> input)
Overrides:
connectInput in class ContainerItemProvider<IContainer<Object>>

disconnectInput

protected void disconnectInput(IContainer<Object> input)
Overrides:
disconnectInput in class ContainerItemProvider<IContainer<Object>>

getChildren

public Object[] getChildren(Object element)
Specified by:
getChildren in interface ITreeContentProvider
Overrides:
getChildren in class ContainerItemProvider<IContainer<Object>>

hasChildren

public boolean hasChildren(Object element)
Specified by:
hasChildren in interface ITreeContentProvider
Overrides:
hasChildren in class ItemProvider<IContainer<Object>>

getParent

public Object getParent(Object element)
Specified by:
getParent in interface ITreeContentProvider
Overrides:
getParent in class ContainerItemProvider<IContainer<Object>>

getText

public String getText(Object obj)
Specified by:
getText in interface ILabelProvider
Overrides:
getText in class ItemProvider<IContainer<Object>>

getImage

public Image getImage(Object obj)
Specified by:
getImage in interface ILabelProvider
Overrides:
getImage in class ContainerItemProvider<IContainer<Object>>

getFont

public Font getFont(Object obj)
Specified by:
getFont in interface IFontProvider
Overrides:
getFont in class ContainerItemProvider<IContainer<Object>>

fillContextMenu

protected void fillContextMenu(IMenuManager manager,
                               ITreeSelection selection)
Overrides:
fillContextMenu in class ContainerItemProvider<IContainer<Object>>

fillResourceFolder

protected void fillResourceFolder(IMenuManager manager,
                                  CDOResourceFolder folder)
Since:
3.0

fillResource

protected void fillResource(IMenuManager manager,
                            CDOResource resource)
Since:
3.0

fillSession

protected void fillSession(IMenuManager manager,
                           CDOSession session)
Since:
2.0

fillGenerated

protected boolean fillGenerated(MenuManager manager,
                                CDOSession session)
Since:
2.0

fillView

protected void fillView(IMenuManager manager,
                        CDOView view)
Since:
2.0

elementAdded

protected void elementAdded(Object element,
                            Object parent)
Overrides:
elementAdded in class ContainerItemProvider<IContainer<Object>>

getViewImageDescriptor

public static ImageDescriptor getViewImageDescriptor(CDOView view)
Since:
3.0

getViewImage

public static Image getViewImage(CDOView view)
Since:
3.0


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.