Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.compare
Interface ITypedElement

All Known Subinterfaces:
  IDiffContainer, IDiffElement, ISynchronizeModelElement

All Known Implementing Classes:
  DiffContainer, DiffElement, DiffNode, HistoryItem, ResourceNode

public interface ITypedElement

Interface for getting the name, image, and type for an object.

These methods are typically used to present an input object in the compare UI (`getName` and `getImage`) and for finding a viewer for a given input type (`getType`).

Clients may implement this interface.

Field Summary
`static String` | `FOLDER_TYPE` Type for a folder input (value `"FOLDER"`).
`static String` | `TEXT_TYPE` Type for an element whose actual type is text (value `"txt"`).
`static String` | `UNKNOWN_TYPE` Type for an element whose actual type could not be determined.

Method Summary
`Image` | `getImage()` Returns an image for this object.
`String` | `getName()` Returns the name of this object.
`String` | `getType()` Returns the type of this object.

Field Detail

### FOLDER_TYPE

    public 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

    public static final String TEXT_TYPE

  Type for an element whose actual type is text (value `"txt"`).

  See Also:
    Constant Field Values

### UNKNOWN_TYPE

    public 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

    public 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

    public 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 `null` if this type of input has no image

### getType

    public String getType()

  Returns the type of this object. For objects with a file name this is typically the file extension. For folders its the constant `FOLDER_TYPE`. The type is used for determining a suitable viewer for this object.

  Returns:
    the type of this object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.