private static int getNodePosition(@NotNull DBNNode node) {
        if (!(node instanceof DBNDatabaseNode)) {
            return -1;
        }
        final DBSObject object = ((DBNDatabaseNode) node).getObject();
        if (!(object instanceof DBPOrderedObject)) {
            return -1;
        }
        return ((DBPOrderedObject) object).getOrdinalPosition();
    }
Performs grouping of a consecutive nodes.

@param nodes nodes to group
@return an array of arrays containing consecutive nodes
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerObjectMove.java