* @see org.eclipse.gef.editparts.AbstractConnectionEditPart#createFigure()
*/
@Override
protected IFigure createFigure() {
// Create figure
UseConnectorFigure connectorFigure = new UseConnectorFigure();
IConnector connector = (IConnector) getModel();
connectorFigure.setToolTip(connector.toString() + " : "+ connector.getCost());
// sets end style
PolygonDecoration polygonDecoration = new PolygonDecoration(); // End connection triangle decorator
connectorFigure.setTargetDecoration(polygonDecoration);
connectorFigure.setLineStyle(Graphics.LINE_SOLID);
connectorFigure.setLineWidth(1);
if (connector.isInCycle()) {
connectorFigure.setForegroundColor(ColorConstants.red);
} else if (connector.getCost() > IDiagram.INTIAL_CONNECTOR_COST) {
connectorFigure.setForegroundColor(ColorConstants.lightGray);
}
if (logger.isLoggable(Level.FINE)) {
//$ANALYSIS-IGNORE
logger.fine("createFigure() -> " + connectorFigure);