Ejemplo n.º 1
0
  /** @return An Image for an EObject instance */
  private Image getObjectImage(EObject eObject) {
    IElementUIProvider provider = ElementUIFactory.INSTANCE.getProvider(eObject.eClass());
    if (provider != null) {
      return provider.getImage(eObject);
    }

    return getEClassImage(eObject.eClass());
  }
Ejemplo n.º 2
0
  /** @return An Image for an EClass */
  private Image getEClassImage(EClass eClass) {
    IElementUIProvider provider = ElementUIFactory.INSTANCE.getProvider(eClass);
    if (provider != null) {
      return provider.getImage();
    }

    String imageName = getImageName(eClass);
    if (imageName != null) {
      return IZentaImages.ImageFactory.getImage(imageName);
    }

    return null;
  }