Examples of DestroyReferenceCommand


Examples of org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand

              if (Fd2VisualIDRegistry.getVisualID(outgoingLink) == OneManyRelationTargetFeatureNodesEditPart.VISUAL_ID) {
                DestroyReferenceRequest r = new DestroyReferenceRequest(
                    outgoingLink.getSource().getElement(),
                    null, outgoingLink.getTarget()
                        .getElement(), false);
                cmd.add(new DestroyReferenceCommand(r));
                cmd.add(new DeleteCommand(getEditingDomain(),
                    outgoingLink));
                continue;
              }
            }
            cmd.add(new DestroyElementCommand(
                new DestroyElementRequest(getEditingDomain(),
                    cnode.getElement(), false))); // directlyOwned: true
            // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
            // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
            break;
          case CaseOrRelationEditPart.VISUAL_ID:
            for (Iterator it = cnode.getSourceEdges().iterator(); it
                .hasNext();) {
              Edge outgoingLink = (Edge) it.next();
              if (Fd2VisualIDRegistry.getVisualID(outgoingLink) == OneManyRelationTargetFeatureNodesEditPart.VISUAL_ID) {
                DestroyReferenceRequest r = new DestroyReferenceRequest(
                    outgoingLink.getSource().getElement(),
                    null, outgoingLink.getTarget()
                        .getElement(), false);
                cmd.add(new DestroyReferenceCommand(r));
                cmd.add(new DeleteCommand(getEditingDomain(),
                    outgoingLink));
                continue;
              }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.