private List<ArrangeConstraint> getArrangeConstraints(final EObject diagramElement) {
   List<ArrangeConstraint> constraints = null;
   if (diagramElement instanceof AbstractDNode) {
     final AbstractDNode node = (AbstractDNode) diagramElement;
     constraints = node.getArrangeConstraints();
   } else if (diagramElement instanceof DEdge) {
     final DEdge edge = (DEdge) diagramElement;
     constraints = edge.getArrangeConstraints();
   }
   return constraints;
 }
 private void addBorderNodes(AbstractDNode abstractNode, Collection<DNode> result) {
   final Iterator<DNode> itBorder = abstractNode.getOwnedBorderedNodes().iterator();
   while (itBorder.hasNext()) {
     final DNode borderNode = itBorder.next();
     result.add(borderNode);
     addBorderNodes(borderNode, result);
   }
 }