Review ConnectorHierarchicElementConnectionCompositorBase.canConnnect()
Description:
- The condition
dc.getTarget() instanceof RootEditPart
is always false (at least in the logical architecture, resulting in the method to returntrue
in any case. - Since this behavior is acceptable (at least for the logical
architecture since a free input port may be multiple input ports of
(one or more) component), this issue does not need immediate action.
However, it effectively makes
canConnectInterally()
method useless.
Proposed action:
- See fix to
HierarchicElementConnectorConnectionCompositorBase.canConnect()
and issues #2233 and #2234
Excerpt from ConnectorHierarchicElementConnectionCompositorBase
public boolean canConnect(S source, T target, HE parent, IConnectionCompositionContext context) {
if(context instanceof ConnectionDragContext) {
ConnectionDragContext dc = (ConnectionDragContext)context;
if(dc.getSource() instanceof FreeConnectorEditPartBase &&
dc.getTarget() instanceof RootEditPart) {
return canConnectInterally();
}
}
return true;
}
(from redmine: issue id 2235, created on 2015-01-27, closed on 2016-01-25)
- Relations:
- relates #2233 (closed)
- relates #2285 (closed)