Source:
public boolean isMovableByAutomaticLayout(List<IDiagramElementEditPart> elementsToNotMove) { boolean isMovableByAutomaticLayout = true; if (!(editPart instanceof SiriusNoteEditPart)) { if (editPart.resolveSemanticElement() instanceof DDiagramElement) { DDiagramElement dDiagramElement = (DDiagramElement) editPart.resolveSemanticElement(); isMovableByAutomaticLayout = !(new PinHelper().isPinned(dDiagramElement) || (elementsToNotMove != null && elementsToNotMove.contains(editPart))); } } else { boolean connectedToPinnedElement = false; for (ConnectionEditPart sourceConn : Iterables.filter(editPart.getSourceConnections(), ConnectionEditPart.class)) { if (sourceConn.getTarget() instanceof IGraphicalEditPart) { connectedToPinnedElement = connectedToPinnedElement || !(new EditPartQuery((IGraphicalEditPart) sourceConn.getTarget()).isMovableByAutomaticLayout(elementsToNotMove)); } } for (ConnectionEditPart targetConn : Iterables.filter(editPart.getTargetConnections(), ConnectionEditPart.class)) { if (targetConn.getSource() instanceof IGraphicalEditPart) { connectedToPinnedElement = connectedToPinnedElement || !(new EditPartQuery((IGraphicalEditPart) targetConn.getTarget()).isMovableByAutomaticLayout(elementsToNotMove)); } } if (connectedToPinnedElement) { isMovableByAutomaticLayout = false; } else if (!Platform.getPreferencesService().getBoolean(DiagramPlugin.ID, SiriusDiagramPreferencesKeys.PREF_MOVE_NOTES_DURING_LATOUT.name(), false, null)) { isMovableByAutomaticLayout = false; } } return isMovableByAutomaticLayout; }

Target:
public boolean isMovableByAutomaticLayout(List<IDiagramElementEditPart> elementsToNotMove) { boolean isMovableByAutomaticLayout = true; if (!(editPart instanceof SiriusNoteEditPart)) { if (editPart.resolveSemanticElement() instanceof DDiagramElement) { DDiagramElement dDiagramElement = (DDiagramElement) editPart.resolveSemanticElement(); isMovableByAutomaticLayout = !(new PinHelper().isPinned(dDiagramElement) || (elementsToNotMove != null && elementsToNotMove.contains(editPart))); } } else { if (!Platform.getPreferencesService().getBoolean(DiagramPlugin.ID, SiriusDiagramPreferencesKeys.PREF_MOVE_NOTES_DURING_LATOUT.name(), false, null)) { isMovableByAutomaticLayout = false; } else { boolean connectedToPinnedElement = false; Iterable<ConnectionEditPart> filterSourceConnections = () -> editPart.getSourceConnections().stream().filter(ConnectionEditPart.class::isInstance).map(ConnectionEditPart.class::cast) .iterator(); for (ConnectionEditPart sourceConn : filterSourceConnections) { if (sourceConn.getTarget() instanceof IGraphicalEditPart) { connectedToPinnedElement = connectedToPinnedElement || !(new EditPartQuery((IGraphicalEditPart) sourceConn.getTarget()).isMovableByAutomaticLayout(elementsToNotMove)); } } Iterable<ConnectionEditPart> filterTargetConnections = () -> editPart.getTargetConnections().stream().filter(ConnectionEditPart.class::isInstance).map(ConnectionEditPart.class::cast) .iterator(); for (ConnectionEditPart targetConn : filterTargetConnections) { if (targetConn.getSource() instanceof IGraphicalEditPart) { connectedToPinnedElement = connectedToPinnedElement || !(new EditPartQuery((IGraphicalEditPart) targetConn.getSource()).isMovableByAutomaticLayout(elementsToNotMove)); } } if (connectedToPinnedElement) { isMovableByAutomaticLayout = false; } } } return isMovableByAutomaticLayout; }