Class CDOItemProvider

java.lang.Object
org.eclipse.jface.viewers.ViewerComparator
org.eclipse.jface.viewers.ViewerSorter
org.eclipse.net4j.util.ui.StructuredContentProvider<INPUT>
org.eclipse.net4j.util.ui.views.ItemProvider<CONTAINER>
org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
org.eclipse.emf.cdo.ui.CDOItemProvider
All Implemented Interfaces:
EventListener, DelegatingStyledCellLabelProvider.IStyledLabelProvider, IBaseLabelProvider, IColorProvider, IContentProvider, IFontProvider, ILabelProvider, IStructuredContentProvider, ITreeContentProvider, org.eclipse.net4j.util.event.IListener

public class CDOItemProvider extends org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.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.

Author:
Eike Stepper
See Also:
  • Constructor Details

    • CDOItemProvider

      public CDOItemProvider(IWorkbenchPage page, org.eclipse.net4j.util.ui.views.IElementFilter rootElementFilter)
    • CDOItemProvider

      public CDOItemProvider(IWorkbenchPage page)
  • Method Details

    • dispose

      public void dispose()
      Specified by:
      dispose in interface IBaseLabelProvider
      Specified by:
      dispose in interface IContentProvider
      Overrides:
      dispose in class org.eclipse.net4j.util.ui.StructuredContentProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • useFullPath

      public boolean useFullPath(Object object)
      Since:
      4.4
    • isMergeMainBranchWithSession

      public boolean isMergeMainBranchWithSession()
      Since:
      4.2
    • setMergeMainBranchWithSession

      public void setMergeMainBranchWithSession(boolean mergeMainBranchWithSession)
      Since:
      4.2
    • getChildren

      public Object[] getChildren(Object element)
      Specified by:
      getChildren in interface ITreeContentProvider
      Overrides:
      getChildren in class org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • getChildren

      protected Object[] getChildren(CDOBranch branch)
      Since:
      4.2
    • hasChildren

      public boolean hasChildren(Object element)
      Specified by:
      hasChildren in interface ITreeContentProvider
      Overrides:
      hasChildren in class org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • hasChildren

      protected boolean hasChildren(CDOBranch branch)
      Since:
      4.2
    • getParent

      public Object getParent(Object element)
      Specified by:
      getParent in interface ITreeContentProvider
      Overrides:
      getParent in class org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • getText

      public String getText(Object obj)
      Specified by:
      getText in interface ILabelProvider
      Overrides:
      getText in class org.eclipse.net4j.util.ui.views.ItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • getImage

      public Image getImage(Object obj)
      Specified by:
      getImage in interface DelegatingStyledCellLabelProvider.IStyledLabelProvider
      Specified by:
      getImage in interface ILabelProvider
      Overrides:
      getImage in class org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • getWorkbenchImage

      protected Image getWorkbenchImage(String name)
      Since:
      4.2
    • getResourceManager

      protected ResourceManager getResourceManager()
      Since:
      4.2
    • getForeground

      public Color getForeground(Object obj)
      Specified by:
      getForeground in interface IColorProvider
      Overrides:
      getForeground in class org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • getFont

      public Font getFont(Object obj)
      Specified by:
      getFont in interface IFontProvider
      Overrides:
      getFont in class org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • fillContextMenu

      public void fillContextMenu(IMenuManager manager, ITreeSelection selection)
      Overrides:
      fillContextMenu in class org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
      Since:
      4.2
    • fillSession

      public void fillSession(IMenuManager manager, CDOSession session)
      Since:
      4.2
    • fillGenerated

      public boolean fillGenerated(MenuManager manager, CDOSession session)
      Since:
      4.2
    • fillView

      public void fillView(IMenuManager manager, CDOView view)
      Since:
      4.2
    • fillBranch

      public void fillBranch(IMenuManager manager, CDOBranch branch)
      Since:
      4.2
    • fillResourceNode

      public void fillResourceNode(IMenuManager manager, CDOResourceNode node)
      Since:
      4.4
    • fillResourceFolder

      public void fillResourceFolder(IMenuManager manager, CDOResourceFolder folder)
      Since:
      4.2
    • fillResourceLeaf

      public void fillResourceLeaf(IMenuManager manager, Object object)
      Since:
      4.2
    • fillResource

      public void fillResource(IMenuManager manager, CDOResource resource)
      Since:
      4.2
    • fillTextResource

      public void fillTextResource(IMenuManager manager, CDOTextResource resource)
      Since:
      4.2
    • fillBinaryResource

      public void fillBinaryResource(IMenuManager manager, CDOBinaryResource resource)
      Since:
      4.2
    • elementAdded

      protected void elementAdded(Object element, Object parent)
      Overrides:
      elementAdded in class org.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
    • compare

      public int compare(Viewer viewer, Object e1, Object e2)
      Overrides:
      compare in class ViewerComparator
      Since:
      4.2
    • getViewImageDescriptor

      public static ImageDescriptor getViewImageDescriptor(CDOView view)
      Since:
      3.0
    • getViewImage

      public static Image getViewImage(CDOView view)
      Since:
      3.0