content: package oscfg.diagram.edit.parts;
  
  import org.eclipse.draw2d.Connection;
  import org.eclipse.draw2d.Graphics;
  import org.eclipse.draw2d.PolylineDecoration;
  import org.eclipse.draw2d.RotatableDecoration;
  import org.eclipse.gef.EditPart;
  import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
  import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
  import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
  import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
  import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
  import org.eclipse.gmf.runtime.notation.View;
  import org.eclipse.swt.graphics.Color;
  
  import oscfg.diagram.edit.policies.MessageNotifiesItemSemanticEditPolicy;
  
  /**
   * @generated
   */
  public class MessageNotifiesEditPart extends ConnectionNodeEditPart implements
  		ITreeBranchEditPart {
  
  	/**
  	 * @generated
  	 */
  	public static final int VISUAL_ID = 4006;
  
  	/**
  	 * @generated
  	 */
  	public MessageNotifiesEditPart(View view) {
  		super(view);
  	}
  
  	/**
  	 * @generated
  	 */
  	protected void createDefaultEditPolicies() {
  		super.createDefaultEditPolicies();
  		installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
  				new MessageNotifiesItemSemanticEditPolicy());
  	}
  
  	/**
  	 * @generated
  	 */
  	protected boolean addFixedChild(EditPart childEditPart) {
  		if (childEditPart instanceof WrappingLabel6EditPart) {
  			((WrappingLabel6EditPart) childEditPart).setLabel(getPrimaryShape()
  					.getFigureNotifiesLabel());
  			return true;
  		}
  		return false;
  	}
  
  	/**
  	 * @generated
  	 */
  	protected void addChildVisual(EditPart childEditPart, int index) {
  		if (addFixedChild(childEditPart)) {
  			return;
  		}
  		super.addChildVisual(childEditPart, index);
  	}
  
  	/**
  	 * @generated
  	 */
  	protected boolean removeFixedChild(EditPart childEditPart) {
  		if (childEditPart instanceof WrappingLabel6EditPart) {
  			return true;
  		}
  		return false;
  	}
  
  	/**
  	 * @generated
  	 */
  	protected void removeChildVisual(EditPart childEditPart) {
  		if (removeFixedChild(childEditPart)) {
  			return;
  		}
  		super.removeChildVisual(childEditPart);
  	}
  
  	/**
  	 * Creates figure for this edit part.
  	 * 
  	 * Body of this method does not depend on settings in generation model
  	 * so you may safely remove <i>generated</i> tag and modify it.
  	 * 
  	 * @generated
  	 */
  
  	protected Connection createConnectionFigure() {
  		return new MessageNotifiesFigure();
  	}
  
  	/**
  	 * @generated
  	 */
  	public MessageNotifiesFigure getPrimaryShape() {
  		return (MessageNotifiesFigure) getFigure();
  	}
  
  	/**
  	 * @generated
  	 */
  	public class MessageNotifiesFigure extends PolylineConnectionEx {
  
  		/**
  		 * @generated
  		 */
  		private WrappingLabel fFigureNotifiesLabel;
  
  		/**
  		 * @generated
  		 */
  		public MessageNotifiesFigure() {
  			this.setLineWidth(2);
  			this.setLineStyle(Graphics.LINE_DASH);
  			this.setForegroundColor(THIS_FORE);
  
  			createContents();
  			setTargetDecoration(createTargetDecoration());
  		}
  
  		/**
  		 * @generated
  		 */
  		private void createContents() {
  
  			fFigureNotifiesLabel = new WrappingLabel();
  			fFigureNotifiesLabel.setText("Notifies");
  
  			this.add(fFigureNotifiesLabel);
  
  		}
  
  		/**
  		 * @generated
  		 */
  		private RotatableDecoration createTargetDecoration() {
  			PolylineDecoration df = new PolylineDecoration();
  			df.setLineWidth(2);
  			return df;
  		}
  
  		/**
  		 * @generated
  		 */
  		public WrappingLabel getFigureNotifiesLabel() {
  			return fFigureNotifiesLabel;
  		}
  
  	}
  
  	/**
  	 * @generated
  	 */
  	static final Color THIS_FORE = new Color(null, 114, 179, 234);
  
  }
  