DiagramConnectionPart connPart = (DiagramConnectionPart)part;
connPart.remove();
}
else if (part instanceof DiagramNodePart)
{
DiagramNodePart nodePart = (DiagramNodePart)part;
deleteNode(nodePart);
}
else if (part instanceof ShapePart)
{
ShapePart shapePart = (ShapePart)part;
deleteShapePart(shapePart);
}
else if (part instanceof SapphireDiagramEditorPagePart)
{
SapphireDiagramEditorPagePart pagePart = (SapphireDiagramEditorPagePart)part;
List<ISapphirePart> parts = new ArrayList<ISapphirePart>();
parts.addAll(pagePart.getSelections());
for (ISapphirePart selectedPart : parts)
{
if (selectedPart instanceof DiagramConnectionPart)
{
DiagramConnectionPart connPart = (DiagramConnectionPart)selectedPart;
connPart.remove();
}
else if (selectedPart instanceof DiagramNodePart)
{
DiagramNodePart nodePart = (DiagramNodePart)selectedPart;
deleteNode(nodePart);
}
else if (selectedPart instanceof ShapePart)
{
ShapePart shapePart = (ShapePart)selectedPart;