Package org.eclipse.emf.cdo.ui
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Alistener
on the platform'seditor registry
that fireslabel events
from the associateditem provider
whenelement
labels need to be updated.Nested classes/interfaces inherited from class org.eclipse.net4j.util.ui.views.ContainerItemProvider
org.eclipse.net4j.util.ui.views.ContainerItemProvider.AbstractContainerNode, org.eclipse.net4j.util.ui.views.ContainerItemProvider.AbstractNode, org.eclipse.net4j.util.ui.views.ContainerItemProvider.ContainerNode, org.eclipse.net4j.util.ui.views.ContainerItemProvider.ErrorElement, org.eclipse.net4j.util.ui.views.ContainerItemProvider.FixedChildrenNode, org.eclipse.net4j.util.ui.views.ContainerItemProvider.LazyElement, org.eclipse.net4j.util.ui.views.ContainerItemProvider.LeafNode, org.eclipse.net4j.util.ui.views.ContainerItemProvider.Node, org.eclipse.net4j.util.ui.views.ContainerItemProvider.SlowElement
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.IListener
org.eclipse.net4j.util.event.IListener.NotifierAware
-
Field Summary
Fields inherited from class org.eclipse.net4j.util.ui.views.ContainerItemProvider
ERROR_IMAGE, PENDING_COLOR, PENDING_IMAGE
Fields inherited from class org.eclipse.net4j.util.ui.views.ItemProvider
NO_ELEMENTS
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
-
Constructor Summary
ConstructorDescriptionCDOItemProvider
(IWorkbenchPage page, org.eclipse.net4j.util.ui.views.IElementFilter rootElementFilter) -
Method Summary
Modifier and TypeMethodDescriptionint
void
dispose()
protected void
elementAdded
(Object element, Object parent) void
fillBinaryResource
(IMenuManager manager, CDOBinaryResource resource) void
fillBranch
(IMenuManager manager, CDOBranch branch) void
fillContextMenu
(IMenuManager manager, ITreeSelection selection) boolean
fillGenerated
(MenuManager manager, CDOSession session) void
fillResource
(IMenuManager manager, CDOResource resource) void
fillResourceFolder
(IMenuManager manager, CDOResourceFolder folder) void
fillResourceLeaf
(IMenuManager manager, Object object) void
fillResourceNode
(IMenuManager manager, CDOResourceNode node) void
fillSession
(IMenuManager manager, CDOSession session) void
fillTextResource
(IMenuManager manager, CDOTextResource resource) void
fillView
(IMenuManager manager, CDOView view) Object[]
getChildren
(Object element) protected Object[]
getChildren
(CDOBranch branch) getForeground
(Object obj) protected ResourceManager
static Image
getViewImage
(CDOView view) static ImageDescriptor
protected Image
getWorkbenchImage
(String name) boolean
hasChildren
(Object element) protected boolean
hasChildren
(CDOBranch branch) boolean
void
setMergeMainBranchWithSession
(boolean mergeMainBranchWithSession) boolean
useFullPath
(Object object) Methods inherited from class org.eclipse.net4j.util.ui.views.ContainerItemProvider
addNode, clearNodesCache, connectInput, createContaineNode, createLeafNode, createNode, createSlowElement, createSlowInput, disconnectInput, elementRemoved, executeRunnable, filterRootElement, getContainerChildren, getErrorText, getNode, getNodes, getRoot, getRootElementFilter, getSlowText, handleElementEvent, handleInactiveElement, isComputeChildrenEagerly, isSlow, pendingColor, pendingImage, removeNode
Methods inherited from class org.eclipse.net4j.util.ui.views.ItemProvider
addListener, fireLabelProviderChanged, fireLabelProviderChanged, fireLabelProviderChanged, getBackground, getElements, getListeners, getStyledText, isLabelProperty, removeListener
Methods inherited from class org.eclipse.net4j.util.ui.StructuredContentProvider
expandElement, getBoldFont, getDisplay, getInput, getItalicFont, getViewer, inputChanged, notifyEvent, refreshElement, refreshSynced, refreshViewer, revealElement, selectElement, updateLabels
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
getCollator
Methods inherited from class org.eclipse.jface.viewers.ViewerComparator
category, getComparator, isSorterProperty, sort
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 Details
-
CDOItemProvider
public CDOItemProvider(IWorkbenchPage page, org.eclipse.net4j.util.ui.views.IElementFilter rootElementFilter) -
CDOItemProvider
-
-
Method Details
-
dispose
public void dispose()- Specified by:
dispose
in interfaceIBaseLabelProvider
- Specified by:
dispose
in interfaceIContentProvider
- Overrides:
dispose
in classorg.eclipse.net4j.util.ui.StructuredContentProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
useFullPath
- Since:
- 4.4
-
isMergeMainBranchWithSession
public boolean isMergeMainBranchWithSession()- Since:
- 4.2
-
setMergeMainBranchWithSession
public void setMergeMainBranchWithSession(boolean mergeMainBranchWithSession) - Since:
- 4.2
-
getChildren
- Specified by:
getChildren
in interfaceITreeContentProvider
- Overrides:
getChildren
in classorg.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
getChildren
- Since:
- 4.2
-
hasChildren
- Specified by:
hasChildren
in interfaceITreeContentProvider
- Overrides:
hasChildren
in classorg.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
hasChildren
- Since:
- 4.2
-
getParent
- Specified by:
getParent
in interfaceITreeContentProvider
- Overrides:
getParent
in classorg.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
getText
- Specified by:
getText
in interfaceILabelProvider
- Overrides:
getText
in classorg.eclipse.net4j.util.ui.views.ItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
getImage
- Specified by:
getImage
in interfaceDelegatingStyledCellLabelProvider.IStyledLabelProvider
- Specified by:
getImage
in interfaceILabelProvider
- Overrides:
getImage
in classorg.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
getWorkbenchImage
- Since:
- 4.2
-
getResourceManager
- Since:
- 4.2
-
getForeground
- Specified by:
getForeground
in interfaceIColorProvider
- Overrides:
getForeground
in classorg.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
getFont
- Specified by:
getFont
in interfaceIFontProvider
- Overrides:
getFont
in classorg.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
fillContextMenu
- Overrides:
fillContextMenu
in classorg.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
- Since:
- 4.2
-
fillSession
- Since:
- 4.2
-
fillGenerated
- Since:
- 4.2
-
fillView
- Since:
- 4.2
-
fillBranch
- Since:
- 4.2
-
fillResourceNode
- Since:
- 4.4
-
fillResourceFolder
- Since:
- 4.2
-
fillResourceLeaf
- Since:
- 4.2
-
fillResource
- Since:
- 4.2
-
fillTextResource
- Since:
- 4.2
-
fillBinaryResource
- Since:
- 4.2
-
elementAdded
- Overrides:
elementAdded
in classorg.eclipse.net4j.util.ui.views.ContainerItemProvider<org.eclipse.net4j.util.container.IContainer<Object>>
-
compare
- Overrides:
compare
in classViewerComparator
- Since:
- 4.2
-
getViewImageDescriptor
- Since:
- 3.0
-
getViewImage
- Since:
- 3.0
-