try {
if (marker.isSubtypeOf(IModelMarkerConstants.DECORATION_GRAPHICAL_MARKER_ID)) {
String anchorString = (String)marker.getAttribute(IModelMarkerConstants.DECORATION_GRAPHICAL_MARKER_ANCHOR_POINT_ATTR);
if (anchorString != null) {
if (anchorString.equals(IMarkerConstants.MARKER_ANCHORPOINT_SOURCE)) {
ConnectionEndpointLocator locator = new ConnectionEndpointLocator(fConnection, false);
locator.setUDistance(4);
locator.setVDistance(0);
return locator;
}
if (anchorString.equals(IMarkerConstants.MARKER_ANCHORPOINT_TARGET)) {
ConnectionEndpointLocator locator = new ConnectionEndpointLocator(fConnection, true);
locator.setUDistance(4);
locator.setVDistance(0);
return locator;
}
if (anchorString.equals(IMarkerConstants.MARKER_ANCHORPOINT_CENTRE)) return new ConnectionLocator(fConnection, ConnectionLocator.MIDDLE);
}
}