final int bpInPartSize = bpInPartList.size();
for( int i = 0, n = min( bpInModelSize, bpInPartSize ); i < n; i++ )
{
final ConnectionBendpoint bpInModel = bpInModelList.get( i );
final Point bpInPart = bpInPartList.get( i );
if (bpInModel.getX().content() != bpInPart.getX())
{
bpInModel.setX( bpInPart.getX() );
}
if (bpInModel.getY().content() != bpInPart.getY())
{
bpInModel.setY( bpInPart.getY() );
}
}
if( bpInModelSize < bpInPartSize )
{
for( int i = bpInModelSize; i < bpInPartSize; i++ )
{
final ConnectionBendpoint bpInModel = bpInModelList.insert();
final Point bpInPart = bpInPartList.get( i );
bpInModel.setX( bpInPart.getX() );
bpInModel.setY( bpInPart.getY() );
}
}
else if( bpInModelSize > bpInPartSize )
{
for( int i = bpInModelSize - 1; i >= bpInPartSize; i-- )