/** @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;
  }
 /** @generated */
 protected IElementType getContextElementType(IEditCommandRequest request) {
   IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
   return requestContextElementType != null ? requestContextElementType : myElementType;
 }