@Override
 public void setTarget(EditPart editPart) {
   super.setTarget(editPart);
   if (editPart instanceof TargetRefElementEditPart) {
     TargetRefElementEditPart target = (TargetRefElementEditPart) editPart;
     TargetRefElement targetElement = (TargetRefElement) ((View) target.getModel()).getElement();
     getPrimaryShape().setOptionalLink(targetElement.isOptional());
   }
 }
 protected void handleNotificationEvent(Notification event) {
   Object feature = event.getFeature();
   if (feature instanceof EAttribute) {
     EAttribute attr = (EAttribute) feature;
     if ("name".equals(attr.getName())) {
       ((DisplayOutTypeFigure) this.getConnectionFigure()).refresh();
     }
   }
   super.handleNotificationEvent(event);
 }
 private Point getAbsoluteEdgeExtremity(
     ConnectionNodeEditPart editPart, boolean isStart, Float[] preferPosition) {
   if (editPart == null) {
     return null;
   }
   PointList points = editPart.getConnectionFigure().getPoints().getCopy();
   if (points.size() == 2
       && new Point(0, 0).equals(points.getFirstPoint())
       && new Point(100, 100).equals(points.getLastPoint())) {
     // not display yet.
     if (preferPosition != null) {
       if (isStart && preferPosition[0] != null) {
         return new Point(0, preferPosition[0].intValue());
       } else if (!isStart && preferPosition[1] != null) {
         return new Point(0, preferPosition[1].intValue());
       }
     }
     return SequenceUtil.getAbsoluteEdgeExtremity(editPart, isStart, false);
   }
   return SequenceUtil.getAbsoluteEdgeExtremity(editPart, isStart, true);
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AssociationItemSemanticEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE,
       new sm_mm.diagram.edit.policies.A2CLhsAttributeItemSemanticEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DisplayOutTypeItemSemanticEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE, new CommentAnnotatedElementItemSemanticEditPolicy());
   installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE, new SourceRefElementClassItemSemanticEditPolicy());
 }
Esempio n. 9
0
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BRTUtteranceItemSemanticEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EmployeeShelvesItemSemanticEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE, new ManagedElementHostedDependencyItemSemanticEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicy.CONNECTION_ROLE, new EclipseconReferenceConnectionEditPolicy());
   installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PresentersItemSemanticEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE,
       new EnabledLogicalElementRemoteAccessAvailableToElementItemSemanticEditPolicy());
 }
Esempio n. 14
0
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE,
       new GGram.diagram.edit.policies.HasAdoptedChildItemSemanticEditPolicy());
 }
Esempio n. 15
0
 /** @generated */
 protected void addChildVisual(EditPart childEditPart, int index) {
   if (addFixedChild(childEditPart)) {
     return;
   }
   super.addChildVisual(childEditPart, -1);
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE, new ProtocolParticipantsItemSemanticEditPolicy());
 }
 /** @generated */
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(
       EditPolicyRoles.SEMANTIC_ROLE, new LogicalDeviceDeviceConnectionItemSemanticEditPolicy());
 }