Class MatchResourceItemProviderSpec
- java.lang.Object
-
- org.eclipse.emf.common.notify.impl.AdapterImpl
-
- org.eclipse.emf.edit.provider.ItemProviderAdapter
-
- org.eclipse.emf.compare.provider.MatchResourceItemProvider
-
- org.eclipse.emf.compare.provider.spec.MatchResourceItemProviderSpec
-
- All Implemented Interfaces:
Adapter
,Adapter.Internal
,ResourceLocator
,IItemDescriptionProvider
,IItemStyledLabelProvider
,CreateChildCommand.Helper
,IChangeNotifier
,IDisposable
,IEditingDomainItemProvider
,IItemColorProvider
,IItemFontProvider
,IItemLabelProvider
,IItemPropertySource
,IStructuredItemContentProvider
,ITreeItemContentProvider
public class MatchResourceItemProviderSpec extends MatchResourceItemProvider implements IItemStyledLabelProvider, IItemDescriptionProvider
SpecializedMatchResourceItemProvider
returning nice output forgetText(Object)
andgetImage(Object)
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
ItemProviderAdapter.ChildrenStore, ItemProviderAdapter.ModifiableSingletonEList<E extends Object>, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommandActionDelegate
-
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
Adapter.Internal
-
-
Field Summary
-
Fields inherited from class org.eclipse.emf.compare.provider.MatchResourceItemProvider
copyright
-
Fields inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
adapterFactory, changeNotifier, childrenFeatures, childrenReferences, childrenStoreMap, itemPropertyDescriptors, targets, wrappers, wrappingNeeded
-
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
-
Fields inherited from interface org.eclipse.emf.edit.provider.IItemColorProvider
GRAYED_OUT_COLOR
-
Fields inherited from interface org.eclipse.emf.edit.provider.IItemFontProvider
BOLD_FONT, BOLD_ITALIC_FONT, ITALIC_FONT, NORMAL_FONT
-
-
Constructor Summary
Constructors Constructor Description MatchResourceItemProviderSpec(AdapterFactory adapterFactory)
Constructor calling superMatchResourceItemProviderSpec(AdapterFactory)
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCommonBase(String left, String right)
Returns the longest common starting substring of the two given strings.String
getDescription(Object object)
Returns the description for the given object.Object
getImage(Object object)
This returns MatchResource.gif.IStyledString.IComposedStyledString
getStyledText(Object object)
Returns the styled text label for the given object.String
getText(Object object)
This returns the label text for the adapted class.static com.google.common.base.Predicate<ResourceAttachmentChange>
uriDifferentFromAll(MatchResource matchResource)
Predicate to check if the URI of the current attachment change is different from all the URIs of the resources matched by the givenMatchResource
.-
Methods inherited from class org.eclipse.emf.compare.provider.MatchResourceItemProvider
addLeftPropertyDescriptor, addLeftURIPropertyDescriptor, addOriginPropertyDescriptor, addOriginURIPropertyDescriptor, addRightPropertyDescriptor, addRightURIPropertyDescriptor, collectNewChildDescriptors, getChildFeature, getChildrenFeatures, getPropertyDescriptors, getResourceLocator, notifyChanged
-
Methods inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter
addListener, adjustWrapperIndex, adjustWrapperIndices, adjustWrapperIndices, createAddCommand, createAddCommand, createChildParameter, createChildrenStore, createCommand, createCopyCommand, createCreateChildCommand, createCreateChildCommand, createCreateCopyCommand, createDragAndDropCommand, createDragAndDropCommand, createInitializeCopyCommand, createItemPropertyDescriptor, createItemPropertyDescriptor, createItemPropertyDescriptor, createMoveCommand, createMoveCommand, createRemoveCommand, createRemoveCommand, createReplaceCommand, createReplaceCommand, createReplaceCommand, createSetCommand, createSetCommand, createWrapper, crop, dispose, disposeWrapper, disposeWrappers, factorAddCommand, factorMoveCommand, factorRemoveCommand, fireNotifyChanged, getAdapterFactory, getBackground, getBackground, getBaseURL, getChildReference, getChildren, getChildrenReferences, getChildrenStore, getColumnImage, getColumnText, getCreateChildDescription, getCreateChildImage, getCreateChildResult, getCreateChildText, getCreateChildToolTipText, getEditableValue, getElements, getFeatureText, getFeatureValue, getFont, getFont, getForeground, getForeground, getImage, getNewChildDescriptors, getParent, getPropertyDescriptor, getPropertyValue, getReferenceValue, getResourceLocator, getRootAdapterFactory, getSetFeature, getSetFeatures, getString, getString, getString, getString, getString, getString, getString, getString, getTypeText, getTypeText, getUpdateableText, getValue, getWrappedValues, hasChildren, hasChildren, isAdapterForType, isEquivalentValue, isPropertySet, isResolveProxies, isValidValue, isWrappingNeeded, overlayImage, removeListener, resetPropertyValue, setPropertyValue, setTarget, shouldComposeCreationImage, shouldTranslate, unsetTarget, unwrap, unwrapCommandValues, updateChildren, wrap, wrapCommand
-
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.emf.edit.provider.IEditingDomainItemProvider
createCommand, getChildren, getNewChildDescriptors, getParent
-
Methods inherited from interface org.eclipse.emf.edit.provider.IItemColorProvider
getBackground, getForeground
-
Methods inherited from interface org.eclipse.emf.edit.provider.IItemFontProvider
getFont
-
Methods inherited from interface org.eclipse.emf.edit.provider.IItemPropertySource
getEditableValue, getPropertyDescriptor
-
Methods inherited from interface org.eclipse.emf.edit.provider.IStructuredItemContentProvider
getElements
-
Methods inherited from interface org.eclipse.emf.edit.provider.ITreeItemContentProvider
getChildren, getParent, hasChildren
-
-
-
-
Constructor Detail
-
MatchResourceItemProviderSpec
public MatchResourceItemProviderSpec(AdapterFactory adapterFactory)
Constructor calling superMatchResourceItemProviderSpec(AdapterFactory)
.- Parameters:
adapterFactory
- the adapter factory
-
-
Method Detail
-
uriDifferentFromAll
public static final com.google.common.base.Predicate<ResourceAttachmentChange> uriDifferentFromAll(MatchResource matchResource)
Predicate to check if the URI of the current attachment change is different from all the URIs of the resources matched by the givenMatchResource
.- Parameters:
matchResource
- The match resource.- Returns:
- The predicate.
- Since:
- 3.0
-
getText
public String getText(Object object)
This returns the label text for the adapted class.- Specified by:
getText
in interfaceIItemLabelProvider
- Overrides:
getText
in classMatchResourceItemProvider
- See Also:
MatchResourceItemProvider.getText(java.lang.Object)
-
getImage
public Object getImage(Object object)
This returns MatchResource.gif.- Specified by:
getImage
in interfaceIItemLabelProvider
- Overrides:
getImage
in classMatchResourceItemProvider
- See Also:
MatchResourceItemProvider.getImage(java.lang.Object)
-
getCommonBase
public String getCommonBase(String left, String right)
Returns the longest common starting substring of the two given strings.- Parameters:
left
- First of the two strings for which we need the common starting substring.right
- Second of the two strings for which we need the common starting substring.- Returns:
- The longest common starting substring of the two given strings.
-
getStyledText
public IStyledString.IComposedStyledString getStyledText(Object object)
Returns the styled text label for the given object.- Specified by:
getStyledText
in interfaceIItemStyledLabelProvider
- Overrides:
getStyledText
in classItemProviderAdapter
- Parameters:
object
- the object to evaluate the styled string for.- Returns:
- the styled string.
- See Also:
IItemStyledLabelProvider.getStyledText(java.lang.Object)
-
getDescription
public String getDescription(Object object)
Returns the description for the given object.- Specified by:
getDescription
in interfaceIItemDescriptionProvider
- Parameters:
object
- the object to evaluate the description for.- Returns:
- the description.
- See Also:
IItemDescriptionProvider.getDescription(java.lang.Object)
-
-