## org.eclipse.emf.compare.ui.util
Class EMFCompareEObjectUtils

    java.lang.Object
      org.eclipse.emf.compare.ui.util.EMFCompareEObjectUtils

    public final class EMFCompareEObjectUtils

extends java.lang.Object

Utility class providing access to some objects description.

Method Summary
`static org.eclipse.swt.graphics.Image` `computeObjectImage(org.eclipse.emf.ecore.EObject eObject)` Computes the image of the given `EObject`.
`static java.lang.String` `computeObjectName(org.eclipse.emf.ecore.EObject eObject)` Computes the name of the given `EObject`.
`static org.eclipse.emf.ecore.EObject` `getAncestorElement(org.eclipse.emf.ecore.EObject object)` Returns the ancestor element of the given `EObject`.
`static org.eclipse.emf.ecore.EObject` `getLeftElement(org.eclipse.emf.ecore.EObject object)` Returns the left element of the given `EObject`.
`static org.eclipse.emf.ecore.EObject` `getRightElement(org.eclipse.emf.ecore.EObject object)` Returns the right element of the given `EObject`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### computeObjectImage

    public static org.eclipse.swt.graphics.Image computeObjectImage(org.eclipse.emf.ecore.EObject eObject)

  Computes the image of the given `EObject`.

  Parameters:
    `eObject` - Object for which we need the image.
  Returns:
    Image of the given `EObject`.

### computeObjectName

    public static java.lang.String computeObjectName(org.eclipse.emf.ecore.EObject eObject)

  Computes the name of the given `EObject`.

  Parameters:
    `eObject` - Object for which we need the name.
  Returns:
    Name of the given `EObject`.

### getAncestorElement

    public static org.eclipse.emf.ecore.EObject getAncestorElement(org.eclipse.emf.ecore.EObject object)

  Returns the ancestor element of the given `EObject`. Will try to invoke the method called "getLeftParent" if the `EObject` is a `ConflictingDiffGroup`, "getOriginElement" if the `EObject` is a `Match3Elements`. `null` if neither of these methods can be found.
  This method is intended to be called with a `ConflictingDiffGroup` or `Match3Elements` as argument.

  Parameters:
    `object` - The `EObject`.
  Returns:
    The right element of the given `EObject`.

### getLeftElement

    public static org.eclipse.emf.ecore.EObject getLeftElement(org.eclipse.emf.ecore.EObject object)

  Returns the left element of the given `EObject`. Will try to invoke the method called "getLeftElement" and, if it fails to find it, "getLeftParent". `null` if neither of these methods can be found.
  This method is intended to be called with a `DiffElement` or MatchElement as argument.

  Parameters:
    `object` - The `EObject`.
  Returns:
    The left element of the given `EObject`.

### getRightElement

    public static org.eclipse.emf.ecore.EObject getRightElement(org.eclipse.emf.ecore.EObject object)

  Returns the right element of the given `EObject`. Will try to invoke the method called "getRightElement" and, if it fails to find it, "getRightParent". `null` if neither of these methods can be found.
  This method is intended to be called with a `DiffElement` or MatchElement as argument.

  Parameters:
    `object` - The `EObject`.
  Returns:
    The right element of the given `EObject`.

Copyright 2006 IBM Corporation and others. All Rights Reserved.