/* (non-Javadoc)
   * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart#createDefaultEditPolicies()
   */
  protected void createDefaultEditPolicies() {
    // node edit policy needs to be installed before connection editpolicy from the super
    // since connections of a node need to be deleted before the node
    // installEditPolicy(EditPolicy.NODE_ROLE, new NodeEditPolicy());
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new GraphicalNodeEditPolicy());

    // Disable note attachment reorient between two shapes where neither is a note.
    installEditPolicy(
        "NoteAttachmentReorient", //$NON-NLS-1$
        new NoteAttachmentReorientEditPolicy());
  }
  /*
   * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart#handleNotificationEvent(org.eclipse.gmf.runtime.diagram.ui.internal.listener.NotificationEvent)
   */
  protected void handleNotificationEvent(Notification notification) {
    Object feature = notification.getFeature();
    if (NotationPackage.eINSTANCE.getView_SourceEdges().equals(feature)) refreshSourceConnections();
    else if (NotationPackage.eINSTANCE.getView_TargetEdges().equals(feature))
      refreshTargetConnections();
    else super.handleNotificationEvent(notification);

    if (NotationPackage.eINSTANCE.getIdentityAnchor_Id().equals(feature)
        || notification.getNewValue() instanceof IdentityAnchor
        || notification.getOldValue() instanceof IdentityAnchor) {
      anchorChange();
    }
  }