/** @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()); }
/** * Get a default human-readable short name for an EClass * * @param eClass The Class * @return A name or null */ public String getDefaultShortName(EClass eClass) { IElementUIProvider provider = ElementUIFactory.INSTANCE.getProvider(eClass); if (provider != null) { return provider.getDefaultShortName(); } return ""; //$NON-NLS-1$ }
/** * @param eClass * @return An ImageDescriptor for an EClass */ public ImageDescriptor getImageDescriptorNonTemplate(EClass eClass) { IElementUIProvider provider = ElementUIFactory.INSTANCE.getProvider(eClass); if (provider != null) { return provider.getImageDescriptor(); } String imageName = getImageName(eClass); if (imageName != null) { return IZentaImages.ImageFactory.getImageDescriptor(imageName); } return null; }
/** @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; }