/** @generated */
 protected EObject getSemanticElement(Object object) {
   View view = null;
   if (object instanceof View) {
     view = (View) object;
   } else if (object instanceof EditPart) {
     EditPart editPart = (EditPart) object;
     if (editPart.getModel() instanceof View) {
       view = (View) editPart.getModel();
     }
   }
   if (view != null && DiagramEditPart.MODEL_ID.equals(MolicVisualIDRegistry.getModelID(view))) {
     return view.getElement();
   }
   return null;
 }
 /** @generated */
 protected void decorateView(
     View containerView,
     View view,
     IAdaptable semanticAdapter,
     String semanticHint,
     int index,
     boolean persisted) {
   if (semanticHint == null) {
     semanticHint = MolicVisualIDRegistry.getType(UbiquitousAccessEditPart.VISUAL_ID);
     view.setType(semanticHint);
   }
   super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
   if (!DiagramEditPart.MODEL_ID.equals(MolicVisualIDRegistry.getModelID(containerView))) {
     EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
     shortcutAnnotation.setSource("Shortcut"); // $NON-NLS-1$
     shortcutAnnotation.getDetails().put("modelID", DiagramEditPart.MODEL_ID); // $NON-NLS-1$
     view.getEAnnotations().add(shortcutAnnotation);
   }
 }