/** @generated */
  private Image getImage(String key, IElementType elementType) {
    ImageRegistry imageRegistry = UMLDiagramEditorPlugin.getInstance().getImageRegistry();
    Image image = imageRegistry.get(key);
    if (image == null && elementType != null && UMLElementTypes.isKnownElementType(elementType)) {
      image = UMLElementTypes.getImage(elementType);
      imageRegistry.put(key, image);
    }

    if (image == null) {
      image = imageRegistry.get("Navigator?ImageNotFound"); // $NON-NLS-1$
      imageRegistry.put(key, image);
    }
    return image;
  }
Пример #2
0
  /** @generated */
  protected Image getLabelIcon() {
    EObject parserElement = getParserElement();
    if (parserElement == null) {
      return null;
    }

    List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
    for (View view : views) {
      if (NameLabelIconHelper.showLabelIcon(view)) {
        return UMLElementTypes.getImage(parserElement.eClass());
      }
    }
    return null;
  }