/** @generated NOT */
  protected void decorateView(
      View containerView,
      View view,
      IAdaptable semanticAdapter,
      String semanticHint,
      int index,
      boolean persisted) {
    if (semanticHint == null) {
      semanticHint = OepcVisualIDRegistry.getType(XORConnectorEditPart.VISUAL_ID);
      view.setType(semanticHint);
    }
    super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
    if (!OEPCEditPart.MODEL_ID.equals(OepcVisualIDRegistry.getModelID(containerView))) {
      EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
      shortcutAnnotation.setSource("Shortcut"); // $NON-NLS-1$
      shortcutAnnotation.getDetails().put("modelID", OEPCEditPart.MODEL_ID); // $NON-NLS-1$
      view.getEAnnotations().add(shortcutAnnotation);
    }

    // setting up default color background to view style
    NotationPackage NOTATION = NotationPackage.eINSTANCE;
    EClass shapeStyle = NOTATION.getShapeStyle();
    ShapeStyle style = (ShapeStyle) view.getStyle(shapeStyle);
    if (style == null) {
      style = (ShapeStyle) view.createStyle(shapeStyle);
    }
    BflowDiagramEditPart.apply(XORConnectorEditPart.class, style);
  }
 /** @generated */
 protected void decorateView(
     View containerView,
     View view,
     IAdaptable semanticAdapter,
     String semanticHint,
     int index,
     boolean persisted) {
   if (semanticHint == null) {
     semanticHint =
         BusinessVisualIDRegistry.getType(
             org.talend.designer.business.model.business.diagram.edit.parts
                 .DataBusinessItemEditPart.VISUAL_ID);
     view.setType(semanticHint);
   }
   super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
   if (!BusinessProcessEditPart.MODEL_ID.equals(
       BusinessVisualIDRegistry.getModelID(containerView))) {
     EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
     shortcutAnnotation.setSource("Shortcut"); // $NON-NLS-1$
     shortcutAnnotation
         .getDetails()
         .put("modelID", BusinessProcessEditPart.MODEL_ID); // $NON-NLS-1$
     view.getEAnnotations().add(shortcutAnnotation);
   }
   getViewService()
       .createNode(
           semanticAdapter,
           view,
           BusinessVisualIDRegistry.getType(DataBusinessItemNameEditPart.VISUAL_ID),
           ViewUtil.APPEND,
           true,
           getPreferencesHint());
 }
 /** @generated */
 private void stampShortcut(View containerView, Node target) {
   if (!SchemaEditPart.MODEL_ID.equals(SqlmodelVisualIDRegistry.getModelID(containerView))) {
     EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
     shortcutAnnotation.setSource("Shortcut"); // $NON-NLS-1$
     shortcutAnnotation.getDetails().put("modelID", SchemaEditPart.MODEL_ID); // $NON-NLS-1$
     target.getEAnnotations().add(shortcutAnnotation);
   }
 }
 /** @generated */
 protected void decorateView(
     View containerView,
     View view,
     IAdaptable semanticAdapter,
     String semanticHint,
     int index,
     boolean persisted) {
   if (semanticHint == null) {
     semanticHint =
         OntoUML.diagram.part.OntoUMLVisualIDRegistry.getType(
             OntoUML.diagram.edit.parts.RoleEditPart.VISUAL_ID);
     view.setType(semanticHint);
   }
   super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
   if (!OntoUML.diagram.edit.parts.ContainerEditPart.MODEL_ID.equals(
       OntoUML.diagram.part.OntoUMLVisualIDRegistry.getModelID(containerView))) {
     EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
     shortcutAnnotation.setSource("Shortcut"); // $NON-NLS-1$
     shortcutAnnotation
         .getDetails()
         .put("modelID", OntoUML.diagram.edit.parts.ContainerEditPart.MODEL_ID); // $NON-NLS-1$
     view.getEAnnotations().add(shortcutAnnotation);
   }
   IAdaptable eObjectAdapter = null;
   EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
   if (eObject != null) {
     eObjectAdapter = new EObjectAdapter(eObject);
   }
   getViewService()
       .createNode(
           eObjectAdapter,
           view,
           OntoUML.diagram.part.OntoUMLVisualIDRegistry.getType(
               OntoUML.diagram.edit.parts.WrappingLabel9EditPart.VISUAL_ID),
           ViewUtil.APPEND,
           true,
           getPreferencesHint());
   getViewService()
       .createNode(
           eObjectAdapter,
           view,
           OntoUML.diagram.part.OntoUMLVisualIDRegistry.getType(
               OntoUML.diagram.edit.parts.RoleNameEditPart.VISUAL_ID),
           ViewUtil.APPEND,
           true,
           getPreferencesHint());
   getViewService()
       .createNode(
           eObjectAdapter,
           view,
           OntoUML.diagram.part.OntoUMLVisualIDRegistry.getType(
               OntoUML.diagram.edit.parts.RoleAttributeCompartmentEditPart.VISUAL_ID),
           ViewUtil.APPEND,
           true,
           getPreferencesHint());
 }
 private void setOrRemoveTransient(EClass eClass) {
   if (eClass.getEAnnotation("teneo.jpa") != null) {
     eClass.getEAnnotations().remove(eClass.getEAnnotation("teneo.jpa"));
   } else {
     final EAnnotation eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
     eAnnotation.setSource("teneo.jpa");
     eAnnotation.getDetails().put("value", "@Transient");
     eClass.getEAnnotations().add(eAnnotation);
   }
 }
 /** @generated */
 protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
     throws ExecutionException {
   for (Iterator it = myDescriptors.iterator(); it.hasNext(); ) {
     CreateViewRequest.ViewDescriptor nextDescriptor =
         (CreateViewRequest.ViewDescriptor) it.next();
     View view = (View) nextDescriptor.getAdapter(View.class);
     if (view != null && view.getEAnnotation("Shortcut") == null) { // $NON-NLS-1$
       EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
       shortcutAnnotation.setSource("Shortcut"); // $NON-NLS-1$
       shortcutAnnotation.getDetails().put("modelID", IStarEditPart.MODEL_ID); // $NON-NLS-1$
       view.getEAnnotations().add(shortcutAnnotation);
     }
   }
   return CommandResult.newOKCommandResult();
 }
  public void setArrowDirection(String dir) {
    View view = this.getNotationView();
    if (view == null) return;

    EAnnotation ea = view.getEAnnotation(ARROW);
    if (ea == null) {
      ea = EcoreFactory.eINSTANCE.createEAnnotation();
      ea.setSource(ARROW);
      ea.getDetails().put(DIRECTION, dir);
      view.getEAnnotations().add(ea);
    } else {
      ea.getDetails().clear();
      ea.getDetails().put(DIRECTION, dir);
    }
  }
 /** @generated */
 private void stampShortcut(View containerView, Node target) {
   if (!edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts.ClassDiagramEditPart
       .MODEL_ID.equals(
       edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part
           .NECSIS14_ClassDiagramVisualIDRegistry.getModelID(containerView))) {
     EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
     shortcutAnnotation.setSource("Shortcut"); // $NON-NLS-1$
     shortcutAnnotation
         .getDetails()
         .put(
             "modelID",
             edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.edit.parts
                 .ClassDiagramEditPart.MODEL_ID); //$NON-NLS-1$
     target.getEAnnotations().add(shortcutAnnotation);
   }
 }
 /** @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);
   }
 }
 /** @generated */
 protected void decorateView(
     View containerView,
     View view,
     IAdaptable semanticAdapter,
     String semanticHint,
     int index,
     boolean persisted) {
   if (semanticHint == null) {
     semanticHint =
         GMFMapVisualIDRegistry.getType(
             org.eclipse.gmf.map.editor.edit.parts.ChildReferenceOwnedChildEditPart.VISUAL_ID);
     view.setType(semanticHint);
   }
   super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
   if (!MappingEditPart.MODEL_ID.equals(GMFMapVisualIDRegistry.getModelID(containerView))) {
     EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
     shortcutAnnotation.setSource("Shortcut"); // $NON-NLS-1$
     shortcutAnnotation.getDetails().put("modelID", MappingEditPart.MODEL_ID); // $NON-NLS-1$
     view.getEAnnotations().add(shortcutAnnotation);
   }
 }
 private void annotateAsGenerated(EOperation newEOperation) {
   EAnnotation eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
   eAnnotation.setSource(EcoreModelRefactorer.class.getName());
   newEOperation.getEAnnotations().add(eAnnotation);
 }