class BPMNCreateNodeAction extends GeneralCreateNodeAction {

    public static boolean isAutoMagnetConnection(final Node<View<?>, Edge> sourceNode,
                                                 final Node<View<?>, Edge> targetNode) {
        final Object sourceDefinition = null != sourceNode ? sourceNode.getContent().getDefinition() : null;
        final Object targetDefinition = null != targetNode ? targetNode.getContent().getDefinition() : null;
        final boolean isSourceGateway = isGateway(sourceDefinition);
        final boolean isTargetGateway = isGateway(targetDefinition);
        return !(isSourceGateway || isTargetGateway);
    }

    @Inject public  BPMNCreateNodeAction(final DefinitionUtils definitionUtils,
                                final ClientFactoryManager clientFactoryManager,
                                final CanvasLayoutUtils canvasLayoutUtils,
                                final Event<CanvasSelectionEvent> selectionEvent,
                                final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                final @Any ManagedInstance<DefaultCanvasCommandFactory> canvasCommandFactories);

}