/** @generated */ private boolean isMyDiagramElement(View view) { int visualID = EsbVisualIDRegistry.getVisualID(view); switch (visualID) { case RuleMediatorInputConnectorEditPart.VISUAL_ID: case RuleMediatorOutputConnectorEditPart.VISUAL_ID: case RuleMediatorChildMediatorsOutputConnectorEditPart.VISUAL_ID: case MediatorFlow17EditPart.VISUAL_ID: return true; } return false; }
/** @generated */ private boolean isMyDiagramElement(View view) { int visualID = EsbVisualIDRegistry.getVisualID(view); switch (visualID) { case DefaultEndPoint2EditPart.VISUAL_ID: case AddressEndPoint2EditPart.VISUAL_ID: case FailoverEndPoint2EditPart.VISUAL_ID: case RecipientListEndPoint2EditPart.VISUAL_ID: case WSDLEndPoint2EditPart.VISUAL_ID: case LoadBalanceEndPoint2EditPart.VISUAL_ID: case HTTPEndpoint2EditPart.VISUAL_ID: return true; } return false; }
/** @generated */ private void addDestroyChildNodesCommand(ICompositeCommand cmd) { View view = (View) getHost().getModel(); for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext(); ) { Node node = (Node) nit.next(); switch (EsbVisualIDRegistry.getVisualID(node)) { case MediatorFlowEditPart.VISUAL_ID: cmd.add( new DestroyElementCommand( new DestroyElementRequest( getEditingDomain(), node.getElement(), false))); // directlyOwned: true // don't need explicit deletion of node as parent's view deletion would clean child views // as well // cmd.add(new // org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node)); break; } } }
/** @generated */ protected Command getDestroyElementCommand(DestroyElementRequest req) { View view = (View) getHost().getModel(); CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null); cmd.setTransactionNestingEnabled(false); for (Iterator<?> it = view.getSourceEdges().iterator(); it.hasNext(); ) { Edge outgoingLink = (Edge) it.next(); if (EsbVisualIDRegistry.getVisualID(outgoingLink) == EsbLinkEditPart.VISUAL_ID) { DestroyElementRequest r = new DestroyElementRequest(outgoingLink.getElement(), false); cmd.add(new DestroyElementCommand(r)); cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink)); continue; } } EAnnotation annotation = view.getEAnnotation("Shortcut"); // $NON-NLS-1$ if (annotation == null) { // there are indirectly referenced children, need extra commands: false addDestroyShortcutsCommand(cmd, view); // delete host element cmd.add(new DestroyElementCommand(req)); } else { cmd.add(new DeleteCommand(getEditingDomain(), view)); } return getGEFWrapper(cmd.reduce()); }
/** @generated */ private boolean isMyDiagramElement(View view) { int visualID = EsbVisualIDRegistry.getVisualID(view); switch (visualID) { case DropMediatorEditPart.VISUAL_ID: case PropertyMediatorEditPart.VISUAL_ID: case ThrottleMediatorEditPart.VISUAL_ID: case FilterMediatorEditPart.VISUAL_ID: case LogMediatorEditPart.VISUAL_ID: case EnrichMediatorEditPart.VISUAL_ID: case XSLTMediatorEditPart.VISUAL_ID: case SwitchMediatorEditPart.VISUAL_ID: case SequenceEditPart.VISUAL_ID: case EventMediatorEditPart.VISUAL_ID: case EntitlementMediatorEditPart.VISUAL_ID: case ClassMediatorEditPart.VISUAL_ID: case SpringMediatorEditPart.VISUAL_ID: case ScriptMediatorEditPart.VISUAL_ID: case FaultMediatorEditPart.VISUAL_ID: case XQueryMediatorEditPart.VISUAL_ID: case CommandMediatorEditPart.VISUAL_ID: case DBLookupMediatorEditPart.VISUAL_ID: case DBReportMediatorEditPart.VISUAL_ID: case SmooksMediatorEditPart.VISUAL_ID: case SendMediatorEditPart.VISUAL_ID: case HeaderMediatorEditPart.VISUAL_ID: case CloneMediatorEditPart.VISUAL_ID: case CacheMediatorEditPart.VISUAL_ID: case IterateMediatorEditPart.VISUAL_ID: case CalloutMediatorEditPart.VISUAL_ID: case TransactionMediatorEditPart.VISUAL_ID: case RMSequenceMediatorEditPart.VISUAL_ID: case RuleMediatorEditPart.VISUAL_ID: case OAuthMediatorEditPart.VISUAL_ID: case AggregateMediatorEditPart.VISUAL_ID: case StoreMediatorEditPart.VISUAL_ID: case BuilderMediatorEditPart.VISUAL_ID: case CallTemplateMediatorEditPart.VISUAL_ID: case PayloadFactoryMediatorEditPart.VISUAL_ID: case EnqueueMediatorEditPart.VISUAL_ID: case URLRewriteMediatorEditPart.VISUAL_ID: case ValidateMediatorEditPart.VISUAL_ID: case RouterMediatorEditPart.VISUAL_ID: case ConditionalRouterMediatorEditPart.VISUAL_ID: case BAMMediatorEditPart.VISUAL_ID: case BeanMediatorEditPart.VISUAL_ID: case EJBMediatorEditPart.VISUAL_ID: case DefaultEndPointEditPart.VISUAL_ID: case AddressEndPointEditPart.VISUAL_ID: case FailoverEndPointEditPart.VISUAL_ID: case RecipientListEndPointEditPart.VISUAL_ID: case WSDLEndPointEditPart.VISUAL_ID: case NamedEndpointEditPart.VISUAL_ID: case LoadBalanceEndPointEditPart.VISUAL_ID: case APIResourceEndpointEditPart.VISUAL_ID: case AddressingEndpointEditPart.VISUAL_ID: case HTTPEndpointEditPart.VISUAL_ID: case TemplateEndpointEditPart.VISUAL_ID: case CloudConnectorEditPart.VISUAL_ID: case CloudConnectorOperationEditPart.VISUAL_ID: case LoopBackMediatorEditPart.VISUAL_ID: case RespondMediatorEditPart.VISUAL_ID: case CallMediatorEditPart.VISUAL_ID: case DataMapperMediatorEditPart.VISUAL_ID: return true; } return false; }
/** @generated */ private void addDestroyChildNodesCommand(ICompositeCommand cmd) { View view = (View) getHost().getModel(); for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext(); ) { Node node = (Node) nit.next(); switch (EsbVisualIDRegistry.getVisualID(node)) { case SwitchMediatorInputConnectorEditPart.VISUAL_ID: for (Iterator<?> it = node.getTargetEdges().iterator(); it.hasNext(); ) { Edge incomingLink = (Edge) it.next(); if (EsbVisualIDRegistry.getVisualID(incomingLink) == EsbLinkEditPart.VISUAL_ID) { DestroyElementRequest r = new DestroyElementRequest(incomingLink.getElement(), false); cmd.add(new DestroyElementCommand(r)); cmd.add(new DeleteCommand(getEditingDomain(), incomingLink)); continue; } } cmd.add( new DestroyElementCommand( new DestroyElementRequest( getEditingDomain(), node.getElement(), false))); // directlyOwned: true // don't need explicit deletion of node as parent's view deletion would clean child views // as well // cmd.add(new // org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node)); break; case SwitchMediatorOutputConnectorEditPart.VISUAL_ID: for (Iterator<?> it = node.getSourceEdges().iterator(); it.hasNext(); ) { Edge outgoingLink = (Edge) it.next(); if (EsbVisualIDRegistry.getVisualID(outgoingLink) == EsbLinkEditPart.VISUAL_ID) { DestroyElementRequest r = new DestroyElementRequest(outgoingLink.getElement(), false); cmd.add(new DestroyElementCommand(r)); cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink)); continue; } } cmd.add( new DestroyElementCommand( new DestroyElementRequest( getEditingDomain(), node.getElement(), false))); // directlyOwned: true // don't need explicit deletion of node as parent's view deletion would clean child views // as well // cmd.add(new // org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node)); break; case SwitchCaseBranchOutputConnectorEditPart.VISUAL_ID: for (Iterator<?> it = node.getSourceEdges().iterator(); it.hasNext(); ) { Edge outgoingLink = (Edge) it.next(); if (EsbVisualIDRegistry.getVisualID(outgoingLink) == EsbLinkEditPart.VISUAL_ID) { DestroyElementRequest r = new DestroyElementRequest(outgoingLink.getElement(), false); cmd.add(new DestroyElementCommand(r)); cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink)); continue; } } cmd.add( new DestroyElementCommand( new DestroyElementRequest( getEditingDomain(), node.getElement(), false))); // directlyOwned: true // don't need explicit deletion of node as parent's view deletion would clean child views // as well // cmd.add(new // org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node)); break; case SwitchDefaultBranchOutputConnectorEditPart.VISUAL_ID: for (Iterator<?> it = node.getSourceEdges().iterator(); it.hasNext(); ) { Edge outgoingLink = (Edge) it.next(); if (EsbVisualIDRegistry.getVisualID(outgoingLink) == EsbLinkEditPart.VISUAL_ID) { DestroyElementRequest r = new DestroyElementRequest(outgoingLink.getElement(), false); cmd.add(new DestroyElementCommand(r)); cmd.add(new DeleteCommand(getEditingDomain(), outgoingLink)); continue; } } cmd.add( new DestroyElementCommand( new DestroyElementRequest( getEditingDomain(), node.getElement(), false))); // directlyOwned: true // don't need explicit deletion of node as parent's view deletion would clean child views // as well // cmd.add(new // org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node)); break; case SwitchMediatorContainerEditPart.VISUAL_ID: cmd.add( new DestroyElementCommand( new DestroyElementRequest( getEditingDomain(), node.getElement(), false))); // directlyOwned: true // don't need explicit deletion of node as parent's view deletion would clean child views // as well // cmd.add(new // org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node)); break; } } }