Project

General

Profile

Bug #2235

Review ConnectorHierarchicElementConnectionCompositorBase.canConnnect()

Added by Simon Barner almost 6 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
01/27/2015
Due date:
% Done:

100%

Estimated time:

Description

Description:
  • The condition dc.getTarget() instanceof RootEditPart is always false (at least in the logical architecture, resulting in the method to return true 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;
    }


Related issues

Related to Bug #2233: Forbid multiple connections from IHierarchicElement -> Free ConnectorClosed01/27/2015

Related to Change Request #2285: [Code improvement] Review ConnectionCompositorBaseClosed02/05/2015

History

#1 Updated by Anonymous almost 6 years ago

  • Related to Bug #2233: Forbid multiple connections from IHierarchicElement -> Free Connector added

#2 Updated by Anonymous over 5 years ago

#3 Updated by Anonymous over 5 years ago

  • Target version changed from AF3 2.8 RC1 (Feature Freeze) to AF3 2.8 RC2 (Tested & Bugfixed)

#4 Updated by Anonymous over 5 years ago

  • Assignee set to Johannes Eder

#5 Updated by Anonymous over 5 years ago

  • Assignee changed from Johannes Eder to Anonymous

#6 Updated by Anonymous about 5 years ago

  • Target version changed from AF3 2.8 RC2 (Tested & Bugfixed) to AF3 2.8 Post-release

#7 Updated by Anonymous about 5 years ago

After multiple tests, this piece of code really does seem useless. I deleted it. Also turned "interally" into "internally"...

#8 Updated by Anonymous about 5 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#9 Updated by Anonymous about 5 years ago

  • Target version changed from AF3 2.8 Post-release to AF3 2.9 RC1 (Features frozen)

This issue can be closed at the next release if it turns out it did not bring any problem.

#10 Updated by Anonymous almost 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF