Interface ITypedElement
-
- All Known Subinterfaces:
ICompareAccessor,IResourceContentsAccessor,IStructuralFeatureAccessor
- All Known Implementing Classes:
AbstractStructuralFeatureAccessor,AbstractTypedElementAdapter,ContainmentReferenceChangeAccessorImpl,FeatureMapKeyChangeAccessorImpl,ManyStructuralFeatureAccessorImpl,MatchAccessor,ResourceContentsAccessorImpl,ResourceStreamAccessorImpl,SingleStructuralFeatureAccessorImpl,StringAttributeChangeAccessor,TypedNotifier
public interface ITypedElementInterface for getting the name, image, and type for an object.These methods are typically used to present an input object in the compare UI (
getNameandgetImage) and for finding a viewer for a given input type (getType).Clients may implement this interface.
- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringFOLDER_TYPEType for a folder input (value"FOLDER").static StringTEXT_TYPEType for an element whose actual type is text (value"txt").static StringUNKNOWN_TYPEType for an element whose actual type could not be determined.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.swt.graphics.ImagegetImage()Returns an image for this object.StringgetName()Returns the name of this object.StringgetType()Returns the type of this object.
-
-
-
Field Detail
-
FOLDER_TYPE
static final String FOLDER_TYPE
Type for a folder input (value"FOLDER"). Folders are comparison elements that have no contents, only a name and children.- See Also:
- Constant Field Values
-
TEXT_TYPE
static final String TEXT_TYPE
Type for an element whose actual type is text (value"txt").- See Also:
- Constant Field Values
-
UNKNOWN_TYPE
static final String UNKNOWN_TYPE
Type for an element whose actual type could not be determined. (value"???").- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Returns the name of this object. The name is used when displaying this object in the UI.- Returns:
- the name of this object
-
getImage
org.eclipse.swt.graphics.Image getImage()
Returns an image for this object. This image is used when displaying this object in the UI.- Returns:
- the image of this object or
nullif this type of input has no image
-
getType
String getType()
Returns the type of this object. For objects with a file name this is typically the file extension. For folders its the constantFOLDER_TYPE. The type is used for determining a suitable viewer for this object.- Returns:
- the type of this object
-
-