public class MatchResourceItemProviderSpec extends MatchResourceItemProvider implements IItemStyledLabelProvider, IItemDescriptionProvider
MatchResourceItemProvider
returning nice output for getText(Object)
and
getImage(Object)
.ItemProviderAdapter.ChildrenStore, ItemProviderAdapter.ModifiableSingletonEList<E>, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommandActionDelegate
Adapter.Internal
copyright
adapterFactory, changeNotifier, childrenFeatures, childrenReferences, childrenStoreMap, itemPropertyDescriptors, targets, wrappers, wrappingNeeded
target
GRAYED_OUT_COLOR
BOLD_FONT, BOLD_ITALIC_FONT, ITALIC_FONT, NORMAL_FONT
Constructor and Description |
---|
MatchResourceItemProviderSpec(AdapterFactory adapterFactory)
Constructor calling super
MatchResourceItemProviderSpec(AdapterFactory) . |
Modifier and Type | Method and 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 given
MatchResource . |
addLeftPropertyDescriptor, addLeftURIPropertyDescriptor, addOriginPropertyDescriptor, addOriginURIPropertyDescriptor, addRightPropertyDescriptor, addRightURIPropertyDescriptor, collectNewChildDescriptors, getChildFeature, getChildrenFeatures, getPropertyDescriptors, getResourceLocator, notifyChanged
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
getTarget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createCommand, getChildren, getNewChildDescriptors, getParent
getChildren, getParent, hasChildren
getElements
getEditableValue, getPropertyDescriptor
getBackground, getForeground
getFont
public MatchResourceItemProviderSpec(AdapterFactory adapterFactory)
MatchResourceItemProviderSpec(AdapterFactory)
.adapterFactory
- the adapter factorypublic static final com.google.common.base.Predicate<ResourceAttachmentChange> uriDifferentFromAll(MatchResource matchResource)
MatchResource
.matchResource
- The match resource.public String getText(Object object)
getText
in interface IItemLabelProvider
getText
in class MatchResourceItemProvider
MatchResourceItemProvider.getText(java.lang.Object)
public Object getImage(Object object)
getImage
in interface IItemLabelProvider
getImage
in class MatchResourceItemProvider
MatchResourceItemProvider.getImage(java.lang.Object)
public String getCommonBase(String left, String right)
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.public IStyledString.IComposedStyledString getStyledText(Object object)
getStyledText
in interface IItemStyledLabelProvider
getStyledText
in class ItemProviderAdapter
object
- the object to evaluate the styled string for.IItemStyledLabelProvider.getStyledText(java.lang.Object)
public String getDescription(Object object)
getDescription
in interface IItemDescriptionProvider
object
- the object to evaluate the description for.IItemDescriptionProvider.getDescription(java.lang.Object)
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.