/* (non-Javadoc)
   * Method declared on Object.
   */
  public boolean equals(Object object) {
    if (object == null || !CallHierarchyImageDescriptor.class.equals(object.getClass()))
      return false;

    CallHierarchyImageDescriptor other = (CallHierarchyImageDescriptor) object;
    return (fBaseImage.equals(other.fBaseImage)
        && fFlags == other.fFlags
        && fSize.equals(other.fSize));
  }
  @Override
  public boolean equals(Object object) {
    if (object == null || !DecoratedImageDescriptor.class.equals(object.getClass())) return false;

    DecoratedImageDescriptor other = (DecoratedImageDescriptor) object;
    return fBaseImage.equals(other.fBaseImage)
        && fFlags == other.fFlags
        && fSize.equals(other.fSize);
  }
  /* (non-Javadoc)
   * Method declared on Object.
   */
  @Override
  public boolean equals(Object object) {
    if (object == null || !JavaElementImageDescriptor.class.equals(object.getClass())) return false;

    JavaElementImageDescriptor other = (JavaElementImageDescriptor) object;
    return (fBaseImage.equals(other.fBaseImage)
        && fFlags == other.fFlags
        && fSize.equals(other.fSize));
  }
  /**
   * Creates an image from the given resource and adds the image to the image registry.
   *
   * @param resource
   * @return Image
   */
  private Image createImage(String resource) {
    ImageDescriptor desc = getImageDescriptor(resource);
    Image image = null;

    if (desc != null) {
      image = desc.createImage();
      // dont add the missing image descriptor image to the image
      // registry
      if (!desc.equals(ImageDescriptor.getMissingImageDescriptor())) {
        getImageRegistry().put(resource, image);
      }
    }
    return image;
  }