I’m not sure of the best way of setting -XMODE=Analyse in Gnat Studio. I wonder if the view mode could set it.
However, I found setting it under preferences => Build Targets by replacing %X works well for me.
It’s also worth realising that there are advanced and basic build targets with basic view being the default.