public override bool CanMoveLinkSource(DesignerItem source, DesignerItem target, DesignerItem newSource) { string sourceName = source.Renderer.Text; string targetName = target.Renderer.Text; string newSourceName = newSource.Renderer.Text; if (sourceName.Equals(newSourceName)) { return(true); } string title = "Unable to move link"; string message = "Unable to move link from : " + sourceName + " to : " + newSourceName + "."; if (source.Tag == null || target.Tag == null || newSource.Tag == null) { message = message + "\n" + "Source or Target Entity is null!"; Kernel.Util.MessageDisplayer.DisplayError(title, message); return(false); } TransformationTreeItem sourceTag = (TransformationTreeItem)source.Tag; TransformationTreeItem targetTag = (TransformationTreeItem)target.Tag; TransformationTreeItem newSourceTag = (TransformationTreeItem)newSource.Tag; if (newSourceTag.childrenListChangeHandler.Items.Count > 0) { message = message + "\n" + newSourceName + " already has a child."; Kernel.Util.MessageDisplayer.DisplayError(title, message); return(false); } if (targetTag.parent != null) { foreach (TransformationTreeItem item in newSourceTag.GetAscendentsTree()) { if (item.name.Equals(targetTag.name)) { message = message + "\n" + "Unable to build cyclic model."; Kernel.Util.MessageDisplayer.DisplayError(title, message); return(false); } } } return(true); }