*
* @param fig
*/
private void updatePorts(IFigure fig) {
Vertex vertex = (Vertex) getModel();
VertexFigure figure = (VertexFigure) fig;
Graph parent = vertex.getParent();
figure.resetPorts();
for (Edge edge : parent.incomingEdgesOf(vertex)) {
String port = (String) edge
.getValue(ObjectType.PARAMETER_TARGET_PORT);
figure.addInputPort(port);
}
for (Edge edge : parent.outgoingEdgesOf(vertex)) {
String port = (String) edge
.getValue(ObjectType.PARAMETER_SOURCE_PORT);
figure.addOutputPort(port);
}
figure.adjustSize();
vertex.setValue(Vertex.PROPERTY_SIZE, figure.getBounds().getCopy());
}