Use this editpolicy org.eclipse.gef.editpolicies.SelectionEditPolicy
and implement the hideSeletion() and showSelection() methods.
You can do something like this in the implementaion in showSelection() set the connection color (say blue) to indicate the selection and in hideSelection() set the color back to original color
Small doubt you said you want to show selection when something is selected . Do you mean to say that you need to show some feed back so that user understands that the connection is selected? And regarding showing selection (feedback) on rectangular figures you can always use the same edit policy irrespective of the type of figures. All you have to do is get the respective figure representing the selection and update it's border thickness or color based on you requirement .