예제 #1
0
 @Override
 public Image getImage(Object element) {
   EObject object = getBusinessObject(element);
   if (object != null) {
     CustomTaskDescriptor ctd = getCustomTaskDescriptor(object);
     if (ctd != null) {
       return PropertyUtil.getImage("CustomTask"); // $NON-NLS-1$
     }
     return PropertyUtil.getImage(object);
   }
   return super.getImage(element);
 }
 /**
  * This method is called from refreshVisuals(), to display the image of the TreeItem.
  *
  * <p>By default this method displays the image of the FIRST attribute of the ModelObject as the
  * TreeItem.
  *
  * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
  */
 @Override
 protected Image getImage() {
   EObject o = (EObject) getModel();
   Image img = labelProvider.getImage(o);
   if (img != null) return img;
   return PropertyUtil.getImage(o);
 }