public void selectEdges(EditPart parent)
{
for (int i = 0; i < parent.getChildren().size(); i++)
{
ChsNodeEditPart node = (ChsNodeEditPart) parent.getChildren().get(i);
for (int s = 0; s < node.getSourceConnections().size(); s++)
{
ChsEdgeEditPart edge =
(ChsEdgeEditPart) node.getSourceConnections().get(s);
if (edge.getEdgeModel().isIntragraph())
{
if (selectionType != SelectEdgesAction.INTER_GRAPH_EDGES)
{
main.getViewer().appendSelection(edge);
}
}
else
{
if (selectionType != SelectEdgesAction.INTRA_GRAPH_EDGES)
{
main.getViewer().appendSelection(edge);
}
}
}
for (int s = 0; s < node.getTargetConnections().size(); s++)
{
ChsEdgeEditPart edge =
(ChsEdgeEditPart) node.getTargetConnections().get(s);
if (edge.getEdgeModel().isIntragraph())
{
if (selectionType != SelectEdgesAction.INTER_GRAPH_EDGES)
{
main.getViewer().appendSelection(edge);
}
}
else
{
if (selectionType != SelectEdgesAction.INTRA_GRAPH_EDGES)
{
main.getViewer().appendSelection(edge);
}
}
}
if (node.getChildren() != Collections.EMPTY_LIST)
{
selectEdges(node);
}
}
}